Author |
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 12 November 2011 at 6:18am | IP Logged
|
|
|
Hi,
I want to manually set Return-Path for every email I send via MailBee. I do this via message.Headers.Set("Return-Path", "<>");
But when I look at the email in my email client I can see that extra Return-Path is added at the top of the email and it equals to FROM address.
Is that a common behaviour of MailBee? Can I turn this off somehow?
Can it be the problem of SMTP server that receives the message?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 12 November 2011 at 11:17pm | IP Logged
|
|
|
Send method has overload which provides senderEmail parameter. That is Return-Path. Actually, mail clients never set Return-Path, it's mail server's job (that's why Return-Path gets duplicated because you set it and your mail server sets it). Mail server sets Return-Path from the value of MAIL FROM command sent by the client. senderEmail parameter lets you manually specify MAIL FROM value, which can be different from "From" value of the message.
Regards,
Alex
|
Back to Top |
|
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 13 November 2011 at 11:15am | IP Logged
|
|
|
Alex wrote:
Send method has overload which provides senderEmail parameter. That is Return-Path. Actually, mail clients never set Return-Path, it's mail server's job (that's why Return-Path gets duplicated because you set it and your mail server sets it). Mail server sets Return-Path from the value of MAIL FROM command sent by the client. senderEmail parameter lets you manually specify MAIL FROM value, which can be different from "From" value of the message.
Regards,
Alex |
|
|
Okay, I understand.
In my case, I want to send empty return path. So, can I provide "<>" as a senderEmail? Moreover, I don't use Send() method, because I send emails asynchronously via Jobs. Can I specify return path in case of using Jobs?
|
Back to Top |
|
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 14 November 2011 at 12:33am | IP Logged
|
|
|
I found. that there is the same parameter in AddJob method, where I can specify senderEmail, but if I set "<>" as a senderEmail then in mail server I can see return-path to be "<<>". If I provide Empty string as senderEmail, I get an error saying that "senderEmail is not specified". If I provide null, then Return-Path is set to FROM field from the email
What can I do to set Return-Path of the email to "<>"?
|
Back to Top |
|
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 14 November 2011 at 12:52am | IP Logged
|
|
|
Okay, I found that if I set senderEmail to be ">" then I can see well formed Return-Path in mail message "<>". But I believe that it depends on specific SMTP server that process my messages.
Is there a better way to control this? I am sure that there might be smtp servers which will not recognize ">" as a valid sender email and won't receive my messages.
|
Back to Top |
|
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 14 November 2011 at 1:52am | IP Logged
|
|
|
Gmail also sends me an error if I try set "<>" as sender email. What can I do?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 14 November 2011 at 6:21am | IP Logged
|
|
|
We don't support and don't allow empty MAIL FROM. Moreover, many servers reject mail from anonymous senders as it's considered bad practice typically used by spammers.
Regards,
Alex
|
Back to Top |
|
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 17 November 2011 at 12:43am | IP Logged
|
|
|
Alex wrote:
We don't support and don't allow empty MAIL FROM. Moreover, many servers reject mail from anonymous senders as it's considered bad practice typically used by spammers.
|
|
|
Yes, I guessed it could be like that. Strange enough that I can read that <> is ok even on wikipedia - http://en.wikipedia.org/wiki/Non_delivery_report#Causes_of_a_bounce_message
But I changed my mind and don't send empty FROM from now. Thanks for the answer!
|
Back to Top |
|
|