简体   繁体   中英

How to redirect an email sent to my azure website onto a customers email on another domain

http://blog.smarx.com/posts/emailtheinternet-com-sending-and-receiving-email-in-windows-azure explains how to listen on a port for incoming email.

I want to grab the email address the mail is sent to like mike@mycustomdomain.com and pass it on to the customers personal email at another host like mike@gmail.com

I'm really not sure if this is even possible. I would prefer NOT to parse the incoming email and send out a new one to the second email address.

Is it possible to forward/redirect an incoming email to another email address without actually sending the email. Maybe a header reply or mail protocol?

My website is an ASP.NET site

There is no such thing as an email sent to my azure website !

E-mails follow different path from the HTTP traffic. And this is controlled by the DNS entries. Your mycompany.com domain may be WEB hosted in Azure WebSites, while the mails for anyone@mycompany.com be handled by Google Apps for Business for instance. Which server handles the e-mails for your domain is controlled by the MX records for that domain. Moreover e-mail runs on ports quite different from the Web Traffic .

Having said that, I want to assure you that no e-mail will ever reach your application hosted in Azure Web Sites.

What you can do is any of the following:

  • Create an extra small WorkerRole, enable IIS and E-Mail (SMTP) server role, configure to just forward the e-mails
  • Just use Google's e-mail service for custom domains (paid of course) or Office365 or the cheapest web hosting provider that offers a mail hosting, and then configure mail forwarding for the account

The concrete implementation of any of the suggested approaches can be found with a simple Internet search.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM