I created this email address “info@mydomain.com” and I want users be able to send email for me through my website.
Here is my code:
MailMessage mailObject = new MailMessage("a@b.com(this is fake email)", "info@mydomain.com", "contact us", "Test message");
SmtpClient smtpC = new SmtpClient("smtp server name");
smtpC.Send(mailObject);
Problem is I dont know what to write for smtp server name. How can I find what is my smtp server name?
This is the address of the SMTP server you want to use. e.g.
smtp.gmail.comif you’re using Gmail.Search you email or hosting provider’s website for “SMTP”. Most likely they will have the details (smtp server name, port, ssl or not) soewhere in the FAQs.