问题
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.
- If you're authenticating to a remote SMTP server for each message, then you need credentials for each user.
- 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:
- You authenticate with
joe@gmail.com
- You send out with
From: bill@gmail.com
- The message will contain
From: bill@gmail.com
, but Google will attachSender: 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