This is a migrated thread and some comments may be shown as answers.
SendEmail causing issue with domains implementing DMARC
2 Answers 6 Views
This is a migrated thread and some comments may be shown as answers.
Todd A
Top achievements
Rank 1
Todd A asked on 07 Sep 2014, 06:49 PM

The popup send email dialog asks for a From Address.  And if the sent from address is different, the email is composed with a "on behalf of".  Unfortunately this is causing blocked emails, in particular when the From Address is from AOL and Yahoo.  

AOL and Yahoo have implemented dmarc which prevents sending on behalf of emails.
http://www.dmarc.org/

So ideally, the From address collected on the input page would be the reply to address (not on behalf of).   Is there some way to resolve this/override it?  or is an improvement in the works?

Thanks,
Todd.

2 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 10 Sep 2014, 11:08 AM
Hi Todd,

RadSocialShare uses the System.Net.Mail namespace and the following code for sending messages:
C#:
private void SendMail(string from, string to, string subject, string body)
{
    MailMessage mail = new MailMessage();
    mail.IsBodyHtml = true;
    mail.From = new MailAddress(from);
    mail.Sender = new MailAddress(_emailSettings.FromEmail);
    string[] recepients = to.Split(',', ';');
    //check if empty - in case of additional , or ;
    foreach (string recepient in recepients) if (recepient != string.Empty) mail.To.Add(new MailAddress(recepient));
    mail.Subject = subject;
    mail.Body = body;
    string smtpServer = EmailSettings.SMTPServer;
    SmtpClient smtp = smtpServer != String.Empty ? new SmtpClient(smtpServer) : new SmtpClient();
    if (EmailSettings.UserName != String.Empty && EmailSettings.Password != string.Empty) smtp.Credentials = new System.Net.NetworkCredential(EmailSettings.UserName, EmailSettings.Password);
    else smtp.UseDefaultCredentials = true;
    //smtp.Credentials = new System.Net.NetworkCredential();
    smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
    smtp.Send(mail);
 
}

Generally the sender is the actual originator of the mail while the from address is simply a part of the header. Therefore I am not sure whether this part of the header can be removed. More information on the matter is available in this forum thread.

You may also find useful this feature request.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Todd A
Top achievements
Rank 1
answered on 10 Sep 2014, 05:01 PM
Yeah, for years the Sender worked just like it was suppose too.  Until this year when yahoo.com followed by aol.com introduced DMARC.  Unfortunately DMARC looks at the From property and ignores the Sender.  In the future, it would be nice to have more control over the mail settings.  For now, I will need to disable that functionality.


Thanks,
Todd.

Asked by
Todd A
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Todd A
Top achievements
Rank 1
Share this question
or