Sending mail using PT_MCF_MAIL
Forum » Forum / Help » Sending mail using PT_MCF_MAIL
Started by: Srinivasa (guest)
On: 1273076324|%e %b %Y, %H:%M %Z|agohover
Number of posts: 3
rss icon RSS: New posts
Sending mail using PT_MCF_MAIL
Srinivasa (guest) 1273076324|%e %b %Y, %H:%M %Z|agohover

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 = "moc.4321|savinirs#moc.4321|savinirs"; /*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?

Reply  |  Options
Unfold Sending mail using PT_MCF_MAIL by Srinivasa (guest), 1273076324|%e %b %Y, %H:%M %Z|agohover
Re: Sending mail using PT_MCF_MAIL
PrajPraj 1273103232|%e %b %Y, %H:%M %Z|agohover

Thanks for posting this.

One option is to use the properties:

  • InvalidAddress
  • ValidUnsentAddresses
  • ValidSentAddresses

However this is not a complete solution for example, after send, the property &email.InvalidAddress will probably be sent for the first example address: test_mail.

However, the second example address: srinivas @ 1234.com won't be considered invalid as your SMTP server will still attempt delivery - it could be a valid email address. Its only the mail delivery failure you get that lets you know it isn't. The email sent result is more about the success of the delivery of the email to the SMTP server, not necessarily to the email address.

I'm not sure when the ValidUnsentAddresses property applies, I'm yet to find a scenario where it is populated.

Reply  |  Options
Unfold Re: Sending mail using PT_MCF_MAIL by PrajPraj, 1273103232|%e %b %Y, %H:%M %Z|agohover
Re: Sending mail using PT_MCF_MAIL
srinivas (guest) 1275533483|%e %b %Y, %H:%M %Z|agohover

Thanks for posting
I've posted the same question Oracle SUport

from Metalink


In PT8.50 we have a new function called isdomainavailable to check if the email address's domain is valid or not. It pings DNS server to validate email addresses. Other than that, there is no other ways. Development has stated that Java mail on the outgoing server does not check for invalid address of TO address while sending an email. It just checks for the correct format of email address.
If you consider to upgrade to PT8.50, this issue can be resolved.

:-(
Thanks
Srinivas

Reply  |  Options
Unfold Re: Sending mail using PT_MCF_MAIL by srinivas (guest), 1275533483|%e %b %Y, %H:%M %Z|agohover
New Post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License