We are developing a .NET application for Windows in C # for commercial distribution.
purpose
I want to add a feature that allows a user to send an email file to any email recipient from the application without requiring an email client on their PC, just an Internet connection. The email they send should appear that it came from them (i.e., their email address is in the FROM / REPLYTO field) so that the recipient can determine where the email came from and they can reply to it.
Current approach
I was going to use the MailMessage class in System.Net.Mail, but it needs an SMTP server to send email. The problem is that I do not want the user to configure anything to send letters from our application - I want him to be configured by us. In other words, I want to determine which SMTP server should send the email and copy it to the application.
I tried to use Gmail as an SMTP server, but one of the main drawbacks is that Gmail automatically overwrites the From line of any email you send via the SMTP gateway of your Gmail address, so when we tested this, even though in the MailMessage code we set the FROM property to myemail@mycompany.com , when the received email was sent, the From field displayed mygmailemail@gmail.com
Questions
If this software application will be distributed to many users in different network environments, is it better to use this method? If so, is there a free / public SMTP server that I can use for our application to achieve this, which will allow the end user to define the FROM and REPLYTO fields?
, -/ SMTP- / SPF, . , ?
- , ?