Send SMTP with From address of another domain

半腔热情 提交于 2019-12-13 03:54:52

问题


My goal is to create a canned email on my server and then send the email from client email addresses. To do this and not be marked as spam I understand it must come from a domain matching the from address. There are many user email addresses I would need to send email from, all with the same domain. With cooperation from my client, could I set this up to work with one SMTP credential or would I need credentials for each and every individual user?

To clarify, if I get an SMTP server address with a un/pw from my client, would that be enough to send from:

george@example.com martha@example.com ted@example.com

Thanks!


回答1:


Problem

You want to avoid joe-jobbing in your automated messages.

Your Options

It depends on how you're submitting jobs to the MTA.

  1. If you're authenticating to a remote SMTP server for each message, then you need credentials for each user.
  2. If you're injecting messages directly into an MTA (e.g. with the sendmail command) that is authorized to send mail for the domain, then you only need privileged access.



回答2:


It depends completely on the SMTP server you are using. Some servers will allow this, like Google's SMTP, but it will attach a Sender header to the outgoing message when the From header does not match the authenticated account.

Example:

  1. You authenticate with joe@gmail.com
  2. You send out with From: bill@gmail.com
  3. The message will contain From: bill@gmail.com, but Google will attach
    Sender: joe@gmail.com to the message headers.

So, it completely depends on the SMTP server and their policy.



来源:https://stackoverflow.com/questions/11055481/send-smtp-with-from-address-of-another-domain

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!