Click here to Skip to main content
15,896,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
In writing code to send an email why there is a need of localhost .
Can we send email from an app. does not running on localhost.Is httpClient enough for sending an email to a gmail server?
Posted

1 solution

You don't nend localhost - you can specify the email sender in the code very easily. You can't use HttpClient though - you need to talk to SMTP instead. There is a generic routine for it here: Sending an Email in C# with or without attachments: generic routine.[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900