开发者

Oracle PL/SQL UTL_SMTP raising a 501 5.1.7 Bad sender address syntax

开发者 https://www.devze.com 2022-12-28 20:00 出处:网络
When I send e-mails using the package UTL_SMTP I am getting this error when executing the comand UTL_SMTP.MAIL:

When I send e-mails using the package UTL_SMTP I am getting this error when executing the comand UTL_SMTP.MAIL:

501 5.1.7 Bad sender address syntax

I am passing olny the e-mail as second parameter. This occurs only with certain smtp servers. The code is this:

sFrom := 'myemail@myserver.com';开发者_开发技巧
Utl_Smtp.Mail(Connection, sFrom);

Does anyone know how to fix this?

Thanks in advance.


Sending email can be a bitch, see the post of the SO creator:

http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html

If this is only happening with some of the smtp servers, I would check the logs of those servers to see what they complain about.

My knowledge about SMTP is a bit dusty, but you can't just connect to a server and tell it to deliver an email with an arbitrary FROM addr. Ask your admin about details.


can you try sFrom := 'myemail@myserver.com <myemail@myserver.com>'

Some smtp servers require an address delimited by brackets <>

0

精彩评论

暂无评论...
验证码 换一张
取 消