MailSettings smtp from setting RRS feed

  • Question

  • I have the following configuration:

          <smtp deliveryMethod="Network" from="">
            <network enableSsl="true" defaultCredentials="false" host="" port="587" userName="" password="blablabla"/>

    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 Here's my code:

    var message = new MailMessage
                    Subject = email.Subject,
                    Body = email.Body,
                    IsBodyHtml = true
                var client = new SmtpClient();

    Take a look at WPF FlashMessage

    Wednesday, February 26, 2014 8:39 PM


  • You are correct, the from attribute is the sender of the email.

    However I see you are using as a server using your login credentials and it is likely that always uses the email associated with your login as sender of the emails. This is to avoid spoofing, you can only send emails via as the logged in user.

    • Marked as answer by Joba Diniz Wednesday, February 26, 2014 10:09 PM
    Wednesday, February 26, 2014 10:01 PM

All replies