简体   繁体   中英

MS Exchange - login as one user and send from another with TLS

I'm working with a system which is setup to send all emails with PHPMailer through an info@company.com account. This is fine, and we use it to send emails from employees eg dave@company.com, mike@company.com etc. However I cannot use TLS with this. When I turn on TLS it rejects the email because the sending address is not the same as the account address, fair enough.

So I'm wondering the best way around this, best I can come up with so far is:

Make a mysql table of every employees username/password, use this to connect to the relevant employee account and send email through that. This would be a nightmare though, eg when users change their password I'd have to update this every time. No method I know of of retreiving passwords from Exchange through Powershell or anything.

Any better solutions? Thanks.

Whether your mail server allows this is up to the mail server, not you. You can work around it by using your own from address, but putting the target user's address as the reply-to address. That way your login will allow sending, you won't be forging from addresses, and replies will still go to them.

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