How to send email using third party email server

254 Views Asked by At

I have a requirement, where registered user can send email thru my application using my email server how can i achieve this?

Example: Registered user email : [email protected],

My email server : mail.xyz.com

Now how can [email protected] can send thru mail.xyz.com as both different domains.

Please suggest..

1

There are 1 best solutions below

2
On

If you control your own email server, you can configure it to allow anyone to send mail using any email address, although that's generally a bad idea because it means people can use your email server to send spam.

If you have protections in place to ensure the email address you're using is a legitimate email address for a registered user, you might feel comfortable allowing them to send email using your mail server.

If your application is running on your server, and can authenticate to your email server using your own username and password, you might be able to configure your email server to allow you to send email with any From address you want.

If your application is running on the user's server or device, you probably don't want to allow it to have your own username and password. In this case it's hard to provide enough protection to ensure your email server isn't abused by spammers.