Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Return-Path is duplicated Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 12 November 2011 at 6:18am | IP Logged Quote Sergei

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 View Sergei's Profile Search for other posts by Sergei
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 12 November 2011 at 11:17pm | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 13 November 2011 at 11:15am | IP Logged Quote Sergei

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 View Sergei's Profile Search for other posts by Sergei
 
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 14 November 2011 at 12:33am | IP Logged Quote Sergei

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 View Sergei's Profile Search for other posts by Sergei
 
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 14 November 2011 at 12:52am | IP Logged Quote Sergei

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 View Sergei's Profile Search for other posts by Sergei
 
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 14 November 2011 at 1:52am | IP Logged Quote Sergei

Gmail also sends me an error if I try set "<>" as sender email. What can I do?
Back to Top View Sergei's Profile Search for other posts by Sergei
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 14 November 2011 at 6:21am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 17 November 2011 at 12:43am | IP Logged Quote Sergei

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 View Sergei's Profile Search for other posts by Sergei
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide