You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Sending mail using PT_MCF_MAIL:MCFOutboundEmail();

1 reply [Last post]
srinivasreddy1812's picture
Joined: 02/27/2010
Posts: 2

Sending mail using PT_MCF_MAIL:MCFOutboundEmail();

We are using the following code to send a mail
import PT_MCF_MAIL:*;

Local PT_MCF_MAIL:MCFOutboundEmail &email = create PT_MCF_MAIL:MCFOutboundEmail();
------------------------------------------
&email.Recipients = "test_mail"; /*incorrect mail id*/
or

&email.Recipients = "srinivas@1234.com"; /*incorrect domain id*/

----------------------------------------------
&email.From = "";
&email.BCC = "";
&email.Subject = "Test mail";
&email.ReplyTo = "";
&email.ContentType = "text/html";
&res = &email.Send();
WinMessage("Mail Sent " | &res | "-" | %ObEmail_Delivered, 0);

I am passing wrong Recipients mail id. when we run this still its &email.Send(); returning 1 (success)..
is there any workaround in PS to validate the mailid against SMTP server.

any idea?

Thanks
Srinivas

Raj's picture
Raj (not verified)
Sending mail using PT_MCF_MAIL:MCFOutboundEmail();

&Mail_flags=0;
&Mail_CC=" ";
&Mail_BCC=" ";

If &DB_Name="FN91DV"
&Mail_To="Select * from PS_PO_Email";
/*here try to use
Exit(1);*/
Else
&Mail_To="srinivas@1234.com"
/*here try to use
Exit(0);*/
End-if;

&ret=SendMail(&Mail_flags, &Mail_To,&Mail_CC,&Mail_BCC);

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.