Is it possible to use java callout to send smtp mail cloud

bbhatia
Participant III

I refered https://community.apigee.com/questions/55824/sending-mail-using-java-callout-in-41709send-mail.html but that article applies to private cloud

I am able to execute java locally and send email successfully but in apigee cloud getting error

java.lang.NoSuchMethodError

com.sun.mail.util.TraceInputStream.<init>(Ljava/io/InputStream;Lcom/sun/mail/util/MailLogger;)V

I tried adding smtp.jar but of now use. Any suggesstion for sending smtp from apigee cloud using java callout?

Solved Solved
0 2 743
1 ACCEPTED SOLUTION

robert
Participant V

hey @Bharat Bhatia, just create a "send mail" API and call it using a service callout or as a target. Seems much easier than using Java inside Edge for this. Heck, you can even use a GCP Function and call that from Edge.

View solution in original post

2 REPLIES 2

I think it is probably not possible.

I see the same error that you observed. I haven't quite sorted out why.

robert
Participant V

hey @Bharat Bhatia, just create a "send mail" API and call it using a service callout or as a target. Seems much easier than using Java inside Edge for this. Heck, you can even use a GCP Function and call that from Edge.