cancel
Showing results for 
Search instead for 
Did you mean: 

Mail UDF doesn't work

Former Member
0 Kudos

Hello there experts!

I've developed some Java UDF at a mapping (at a SOAP response) in order to send a mail directly at the mapping time, but it isn't working. My code is the following:

Imports mail.sdn.*;

public String mail(String statusCode, Container container){

email mail=new mail();

mail.send("myhost.com/something";myreceiver@mail.com, "mytopic";"mycontent"; mysender@mail.com);

return statusCode;

}

even though the statusCode is being populated at the target (so the UDF is working and the flow passes through it) the mail is not being sent.

Could it be that I've got the wrong host? basis team says that the host is correct, as it is set at the SCOT Tx... could it be something about permissions?

Any hint?

Cheers,

Edu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi there experts,

no one has any hint?

cheers

RaghuVamseedhar
Active Contributor
0 Kudos

Edu,

Have you imported mail.zip? Wiki.

Former Member
0 Kudos

Hi Raghu,

do you mean like this?

Cheers,

Edu

Former Member
0 Kudos

i think you need to use mail transport method to send emails. - Transport.send("sample message");

Refer the below blog under Java udf code.

Former Member
0 Kudos

Hi Ramkumar,

I'm trying to replicate this and I'm quite sure they use the mail.send method...

http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=90570965

Cheers,

Edu