Skip to main content
Keep Your Business Open During COVID-19Learn More
Call us
Phone numbers and hours
Help Center

Explore our online help resources


Windows Hosting (Plesk) Help

Send email using System.Net.Mail

To send mail using System.Net.Mail, you need to configure your SMTP service in your application's web.config file using these values for mailSettings:

    <smtp from="your email address">
      <network host="" port="25" />

The network rule's value will be used when you instantiate an SmtpClient in your code.

C# code example

You can then use code similar to this to send email from your application:

MailMessage message = new MailMessage();
message.From = new MailAddress("your email address");

message.To.Add(new MailAddress("your recipient"));

message.Subject = "your subject";
message.Body = "content of your email";

SmtpClient client = new SmtpClient();

Community Related

Jaclyn's Avatar
Autoresponder not working

6 Replies

Last posted almost 2 years ago.

TimothyBrannan's Avatar
Cant receive emails

2 Replies

Last posted almost 2 years ago.

smylz's Avatar
cant send email using php mailer

2 Replies

Last posted almost 3 years ago.

Urbanliving03's Avatar
Cannot Send Email

Be the first to reply

Last posted over 3 years ago.

Don't see what you are looking for? Search the Community