Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

MailSettings smtp from setting

$
0
0

I have the following configuration:

<system.net><mailSettings><smtp deliveryMethod="Network" from="ro-reply@qms.com.br"><network enableSsl="true" defaultCredentials="false" host="smtp.live.com" port="587" userName="joberto@blabla.com.br" password="blablabla"/></smtp></mailSettings></system.net>

What is the purpose of the "from" in smtp tag?

I thought it would be the "from" when you receive an email, but currently the "from" is joberto@blabla.com.br. Here's my code:

var message = new MailMessage
            {
                Subject = email.Subject,
                Body = email.Body,
                IsBodyHtml = true
            };
            message.To.Add(email.To);

            var client = new SmtpClient();
            client.Send(message);


Take a look at WPF FlashMessage
About.me


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>