Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default SmtpServer Property

    Greetings,

    I am using Web.Mail.Mailmessage
    along with Web.Mail.SmtpMail.Send(MailMessage) method

    Now, this sends Email using the Default SMTP server of my REMOTE HOST.

    Sadly I have found that many ISP's block mail sent through this method.
    I do have an SMTP server included in the Remote Hosting package,
    but that SmtpServer requires authentication of outgoing mail.

    If I set the SmtpServer property to my domain's SmtpServer
    then the mail is never sent because it is not authenticated
    with the username and password of the account I am using
    as the MailMessage.To property.

    Is there a way to pass the username and password of the
    account used to send the message through Web.Mail.SmtpMail.SmtpServer
    property??

    Thanks in advance,
    Severin Sampson


    sampsons Guest

  2. Similar Questions and Discussions

    1. #29234 [Com]: empty($object->property) incorrect when property has access overloaded (__get)
      ID: 29234 Comment by: phpbugs at thunder-2000 dot com Reported By: chrissy at codegoat dot com Status: No...
    2. using the Items property in the design time property window
      I hope this is the proper forum. I posted this problem in the wrong one previously. I have a custom server control that I am building. Implementing...
    3. Collection Property problems with Image control ImageUrl property and URLBuilder
      Been using reflector and examining what Microsoft does with the Rows property in the Table class. It looks like all of the items added to the rows...
    4. More Collection Property problems with Image control ImageUrl property and URLBuilder
      After a few more hours of debugging I discovered that the URLBuilder solution that I mentioned previously does not work because there is no service...
    5. Sending mail to Hotmail - Using Smtpserver
      HI, I am using System.web.mail class in my application to send mails. I am using SMTP server for the same. I can send mail to the intranet...
  3. #2

    Default Re: SmtpServer Property

    Hi,
    There isn't anyway of doing this with in System.Web.Mail, which is one of
    the reasons why I wrote [url]www.aspNetEmail.com[/url]

    Sorry,
    Dave
    [url]www.aspNetEmail.com[/url]


    "sampsons" <sampsons@airmail.net> wrote in message
    news:be1uji$ple@library1.airnews.net...
    > Greetings,
    >
    > I am using Web.Mail.Mailmessage
    > along with Web.Mail.SmtpMail.Send(MailMessage) method
    >
    > Now, this sends Email using the Default SMTP server of my REMOTE HOST.
    >
    > Sadly I have found that many ISP's block mail sent through this method.
    > I do have an SMTP server included in the Remote Hosting package,
    > but that SmtpServer requires authentication of outgoing mail.
    >
    > If I set the SmtpServer property to my domain's SmtpServer
    > then the mail is never sent because it is not authenticated
    > with the username and password of the account I am using
    > as the MailMessage.To property.
    >
    > Is there a way to pass the username and password of the
    > account used to send the message through Web.Mail.SmtpMail.SmtpServer
    > property??
    >
    > Thanks in advance,
    > Severin Sampson
    >
    >

    dave wanta Guest

  4. #3

    Default Re: SmtpServer Property

    Hi,

    Look at [url]http://sourceforge.net/projects/opensmtp-net/[/url] for a free open source
    SMTP component.

    Dom

    "dave wanta" <nospam@nospam.com> wrote in message
    news:OIORCfZQDHA.3192@tk2msftngp13.phx.gbl...
    > Hi,
    > There isn't anyway of doing this with in System.Web.Mail, which is one of
    > the reasons why I wrote [url]www.aspNetEmail.com[/url]
    >
    > Sorry,
    > Dave
    > [url]www.aspNetEmail.com[/url]
    >
    >
    > "sampsons" <sampsons@airmail.net> wrote in message
    > news:be1uji$ple@library1.airnews.net...
    > > Greetings,
    > >
    > > I am using Web.Mail.Mailmessage
    > > along with Web.Mail.SmtpMail.Send(MailMessage) method
    > >
    > > Now, this sends Email using the Default SMTP server of my REMOTE HOST.
    > >
    > > Sadly I have found that many ISP's block mail sent through this method.
    > > I do have an SMTP server included in the Remote Hosting package,
    > > but that SmtpServer requires authentication of outgoing mail.
    > >
    > > If I set the SmtpServer property to my domain's SmtpServer
    > > then the mail is never sent because it is not authenticated
    > > with the username and password of the account I am using
    > > as the MailMessage.To property.
    > >
    > > Is there a way to pass the username and password of the
    > > account used to send the message through Web.Mail.SmtpMail.SmtpServer
    > > property??
    > >
    > > Thanks in advance,
    > > Severin Sampson
    > >
    > >
    >
    >

    Dominic Madden Guest

  5. #4

    Default Re: SmtpServer Property

    Why not use cdosys.dll?

    --
    remove underscores to email

    "sampsons" <sampsons@airmail.net> wrote in message
    news:be1uji$ple@library1.airnews.net...
    > Greetings,
    >
    > I am using Web.Mail.Mailmessage
    > along with Web.Mail.SmtpMail.Send(MailMessage) method
    >
    > Now, this sends Email using the Default SMTP server of my REMOTE HOST.
    >
    > Sadly I have found that many ISP's block mail sent through this method.
    > I do have an SMTP server included in the Remote Hosting package,
    > but that SmtpServer requires authentication of outgoing mail.
    >
    > If I set the SmtpServer property to my domain's SmtpServer
    > then the mail is never sent because it is not authenticated
    > with the username and password of the account I am using
    > as the MailMessage.To property.
    >
    > Is there a way to pass the username and password of the
    > account used to send the message through Web.Mail.SmtpMail.SmtpServer
    > property??
    >
    > Thanks in advance,
    > Severin Sampson
    >
    >

    Al Guest

  6. #5

    Default Re: SmtpServer Property

    Hi Sampson,

    <Quote>
    this sends Email using the Default SMTP server of my REMOTE HOST
    </Quote>

    <PleaseNote>
    The mail message can be delivered either through the SMTP mail service built
    into Microsoft Windows 2000 or through an arbitrary SMTP server. Types in
    the System.Web.Mail namespace can be used from ASP.NET or from any managed
    application.

    If the SmtpServer Property is not set, mail is by default queued on a
    Windows 2000 system, ensuring that the calling program does not block
    network traffic. If the SmtpServer property is set, the mail is delivered
    directly to the specified server.
    </PleaseNote>

    You can specify which SMTP Server you would like to send your mail out to.

    <Example>
    Dim Message As New System.Web.Mail.MailMessage()
    'Recipient's name and e-mail address
    Message.To = "Your Name <you@xxxxxxxx.com>"
    'Your name and e-mail address
    Message.From = "Recipient Name <recipient@xxxxxxx.com>"
    Message.Body = "Test message text"
    Message.Subject = "A Test"
    'Your smtp server
    System.Web.Mail.SmtpMail.SmtpServer = "mail.yourIntendedMailServer.com"
    System.Web.Mail.SmtpMail.Send(Message)
    </Example>

    hth

    --
    William T
    Chief Software Developer
    Software Architect
    Softwaremaker.Net Pte Ltd

    +++++++++++++++++++++++++++++


    "Dominic Madden" <dominic@themaddens.info> wrote in message
    news:OZN1iPkQDHA.1712@TK2MSFTNGP12.phx.gbl...
    > Hi,
    >
    > Look at [url]http://sourceforge.net/projects/opensmtp-net/[/url] for a free open
    source
    > SMTP component.
    >
    > Dom
    >
    > "dave wanta" <nospam@nospam.com> wrote in message
    > news:OIORCfZQDHA.3192@tk2msftngp13.phx.gbl...
    > > Hi,
    > > There isn't anyway of doing this with in System.Web.Mail, which is one
    of
    > > the reasons why I wrote [url]www.aspNetEmail.com[/url]
    > >
    > > Sorry,
    > > Dave
    > > [url]www.aspNetEmail.com[/url]
    > >
    > >
    > > "sampsons" <sampsons@airmail.net> wrote in message
    > > news:be1uji$ple@library1.airnews.net...
    > > > Greetings,
    > > >
    > > > I am using Web.Mail.Mailmessage
    > > > along with Web.Mail.SmtpMail.Send(MailMessage) method
    > > >
    > > > Now, this sends Email using the Default SMTP server of my REMOTE HOST.
    > > >
    > > > Sadly I have found that many ISP's block mail sent through this
    method.
    > > > I do have an SMTP server included in the Remote Hosting package,
    > > > but that SmtpServer requires authentication of outgoing mail.
    > > >
    > > > If I set the SmtpServer property to my domain's SmtpServer
    > > > then the mail is never sent because it is not authenticated
    > > > with the username and password of the account I am using
    > > > as the MailMessage.To property.
    > > >
    > > > Is there a way to pass the username and password of the
    > > > account used to send the message through Web.Mail.SmtpMail.SmtpServer
    > > > property??
    > > >
    > > > Thanks in advance,
    > > > Severin Sampson
    > > >
    > > >
    > >
    > >
    >
    >

    Softwaremaker Guest

  7. #6

    Default Re: SmtpServer Property

    Yes William

    But, as stated in original post, my SmtpRemoteServer requires authentication
    of all outgoing emails.

    So I need to pass the username and password for the account used in the
    MailMessage.From Property.

    Severin

    "Softwaremaker" <msdn@removethis.softwaremaker.net> wrote in message
    news:ey$AOXoQDHA.3016@TK2MSFTNGP10.phx.gbl...
    > Hi Sampson,
    >
    > <Quote>
    > this sends Email using the Default SMTP server of my REMOTE HOST
    > </Quote>
    >
    > <PleaseNote>
    > The mail message can be delivered either through the SMTP mail service
    built
    > into Microsoft Windows 2000 or through an arbitrary SMTP server. Types in
    > the System.Web.Mail namespace can be used from ASP.NET or from any managed
    > application.
    >
    > If the SmtpServer Property is not set, mail is by default queued on a
    > Windows 2000 system, ensuring that the calling program does not block
    > network traffic. If the SmtpServer property is set, the mail is delivered
    > directly to the specified server.
    > </PleaseNote>
    >
    > You can specify which SMTP Server you would like to send your mail out to.
    >
    > <Example>
    > Dim Message As New System.Web.Mail.MailMessage()
    > 'Recipient's name and e-mail address
    > Message.To = "Your Name <you@xxxxxxxx.com>"
    > 'Your name and e-mail address
    > Message.From = "Recipient Name <recipient@xxxxxxx.com>"
    > Message.Body = "Test message text"
    > Message.Subject = "A Test"
    > 'Your smtp server
    > System.Web.Mail.SmtpMail.SmtpServer = "mail.yourIntendedMailServer.com"
    > System.Web.Mail.SmtpMail.Send(Message)
    > </Example>
    >
    > hth
    >
    > --
    > William T
    > Chief Software Developer
    > Software Architect
    > Softwaremaker.Net Pte Ltd
    >
    > +++++++++++++++++++++++++++++
    >
    >
    > "Dominic Madden" <dominic@themaddens.info> wrote in message
    > news:OZN1iPkQDHA.1712@TK2MSFTNGP12.phx.gbl...
    > > Hi,
    > >
    > > Look at [url]http://sourceforge.net/projects/opensmtp-net/[/url] for a free open
    > source
    > > SMTP component.
    > >
    > > Dom
    > >
    > > "dave wanta" <nospam@nospam.com> wrote in message
    > > news:OIORCfZQDHA.3192@tk2msftngp13.phx.gbl...
    > > > Hi,
    > > > There isn't anyway of doing this with in System.Web.Mail, which is one
    > of
    > > > the reasons why I wrote [url]www.aspNetEmail.com[/url]
    > > >
    > > > Sorry,
    > > > Dave
    > > > [url]www.aspNetEmail.com[/url]
    > > >
    > > >
    > > > "sampsons" <sampsons@airmail.net> wrote in message
    > > > news:be1uji$ple@library1.airnews.net...
    > > > > Greetings,
    > > > >
    > > > > I am using Web.Mail.Mailmessage
    > > > > along with Web.Mail.SmtpMail.Send(MailMessage) method
    > > > >
    > > > > Now, this sends Email using the Default SMTP server of my REMOTE
    HOST.
    > > > >
    > > > > Sadly I have found that many ISP's block mail sent through this
    > method.
    > > > > I do have an SMTP server included in the Remote Hosting package,
    > > > > but that SmtpServer requires authentication of outgoing mail.
    > > > >
    > > > > If I set the SmtpServer property to my domain's SmtpServer
    > > > > then the mail is never sent because it is not authenticated
    > > > > with the username and password of the account I am using
    > > > > as the MailMessage.To property.
    > > > >
    > > > > Is there a way to pass the username and password of the
    > > > > account used to send the message through
    Web.Mail.SmtpMail.SmtpServer
    > > > > property??
    > > > >
    > > > > Thanks in advance,
    > > > > Severin Sampson
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    sampsons Guest

  8. #7

    Default Re: SmtpServer Property

    System.Web.Mail does not support authentication. you will have to use cdo
    com library directly or get a third party control that does support
    authentication.

    if you only need 1 account you can setup the iis smtp server as a relay to
    your real smtp server and use System.Web.Mail (this is what I do).

    -- bruce (sqlwork.com)


    "sampsons" <sampsons@airmail.net> wrote in message
    news:behl5f$gi5@library2.airnews.net...
    > Yes William
    >
    > But, as stated in original post, my SmtpRemoteServer requires
    authentication
    > of all outgoing emails.
    >
    > So I need to pass the username and password for the account used in the
    > MailMessage.From Property.
    >
    > Severin
    >
    > "Softwaremaker" <msdn@removethis.softwaremaker.net> wrote in message
    > news:ey$AOXoQDHA.3016@TK2MSFTNGP10.phx.gbl...
    > > Hi Sampson,
    > >
    > > <Quote>
    > > this sends Email using the Default SMTP server of my REMOTE HOST
    > > </Quote>
    > >
    > > <PleaseNote>
    > > The mail message can be delivered either through the SMTP mail service
    > built
    > > into Microsoft Windows 2000 or through an arbitrary SMTP server. Types
    in
    > > the System.Web.Mail namespace can be used from ASP.NET or from any
    managed
    > > application.
    > >
    > > If the SmtpServer Property is not set, mail is by default queued on a
    > > Windows 2000 system, ensuring that the calling program does not block
    > > network traffic. If the SmtpServer property is set, the mail is
    delivered
    > > directly to the specified server.
    > > </PleaseNote>
    > >
    > > You can specify which SMTP Server you would like to send your mail out
    to.
    > >
    > > <Example>
    > > Dim Message As New System.Web.Mail.MailMessage()
    > > 'Recipient's name and e-mail address
    > > Message.To = "Your Name <you@xxxxxxxx.com>"
    > > 'Your name and e-mail address
    > > Message.From = "Recipient Name <recipient@xxxxxxx.com>"
    > > Message.Body = "Test message text"
    > > Message.Subject = "A Test"
    > > 'Your smtp server
    > > System.Web.Mail.SmtpMail.SmtpServer = "mail.yourIntendedMailServer.com"
    > > System.Web.Mail.SmtpMail.Send(Message)
    > > </Example>
    > >
    > > hth
    > >
    > > --
    > > William T
    > > Chief Software Developer
    > > Software Architect
    > > Softwaremaker.Net Pte Ltd
    > >
    > > +++++++++++++++++++++++++++++
    > >
    > >
    > > "Dominic Madden" <dominic@themaddens.info> wrote in message
    > > news:OZN1iPkQDHA.1712@TK2MSFTNGP12.phx.gbl...
    > > > Hi,
    > > >
    > > > Look at [url]http://sourceforge.net/projects/opensmtp-net/[/url] for a free open
    > > source
    > > > SMTP component.
    > > >
    > > > Dom
    > > >
    > > > "dave wanta" <nospam@nospam.com> wrote in message
    > > > news:OIORCfZQDHA.3192@tk2msftngp13.phx.gbl...
    > > > > Hi,
    > > > > There isn't anyway of doing this with in System.Web.Mail, which is
    one
    > > of
    > > > > the reasons why I wrote [url]www.aspNetEmail.com[/url]
    > > > >
    > > > > Sorry,
    > > > > Dave
    > > > > [url]www.aspNetEmail.com[/url]
    > > > >
    > > > >
    > > > > "sampsons" <sampsons@airmail.net> wrote in message
    > > > > news:be1uji$ple@library1.airnews.net...
    > > > > > Greetings,
    > > > > >
    > > > > > I am using Web.Mail.Mailmessage
    > > > > > along with Web.Mail.SmtpMail.Send(MailMessage) method
    > > > > >
    > > > > > Now, this sends Email using the Default SMTP server of my REMOTE
    > HOST.
    > > > > >
    > > > > > Sadly I have found that many ISP's block mail sent through this
    > > method.
    > > > > > I do have an SMTP server included in the Remote Hosting package,
    > > > > > but that SmtpServer requires authentication of outgoing mail.
    > > > > >
    > > > > > If I set the SmtpServer property to my domain's SmtpServer
    > > > > > then the mail is never sent because it is not authenticated
    > > > > > with the username and password of the account I am using
    > > > > > as the MailMessage.To property.
    > > > > >
    > > > > > Is there a way to pass the username and password of the
    > > > > > account used to send the message through
    > Web.Mail.SmtpMail.SmtpServer
    > > > > > property??
    > > > > >
    > > > > > Thanks in advance,
    > > > > > Severin Sampson
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    bruce barker Guest

  9. #8

    Default Re: SmtpServer Property

    CDOSYS supports username and password authentication, and version 1.1
    of the .NET Framework added the Fields property to the MailMessage
    class, which lets you set arbitrary fields of the underlying CDOSYS
    object. I haven't tested it, but something like this should work:

    MailMessage m = new MailMessage();
    <configure message>
    m.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"]=1;
    m.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"]="user";
    m.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"]="pass";
    SmtpMail.Send(m);

    See this article for more information about CDOSYS authentication:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_configuring_network_authentication_informa tion.asp[/url]

    "bruce barker" <nospam_brubar@safeco.com> wrote in message news:<OupuPZlRDHA.2240@TK2MSFTNGP11.phx.gbl>...
    > System.Web.Mail does not support authentication. you will have to use cdo
    > com library directly or get a third party control that does support
    > authentication.
    >
    > if you only need 1 account you can setup the iis smtp server as a relay to
    > your real smtp server and use System.Web.Mail (this is what I do).
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "sampsons" <sampsons@airmail.net> wrote in message
    > news:behl5f$gi5@library2.airnews.net...
    > > Yes William
    > >
    > > But, as stated in original post, my SmtpRemoteServer requires
    > authentication
    > > of all outgoing emails.
    > >
    > > So I need to pass the username and password for the account used in the
    > > MailMessage.From Property.
    > >
    > > Severin
    > >
    > > "Softwaremaker" <msdn@removethis.softwaremaker.net> wrote in message
    > > news:ey$AOXoQDHA.3016@TK2MSFTNGP10.phx.gbl...
    > > > Hi Sampson,
    > > >
    > > > <Quote>
    > > > this sends Email using the Default SMTP server of my REMOTE HOST
    > > > </Quote>
    > > >
    > > > <PleaseNote>
    > > > The mail message can be delivered either through the SMTP mail service
    > built
    > > > into Microsoft Windows 2000 or through an arbitrary SMTP server. Types
    > in
    > > > the System.Web.Mail namespace can be used from ASP.NET or from any
    > managed
    > > > application.
    > > >
    > > > If the SmtpServer Property is not set, mail is by default queued on a
    > > > Windows 2000 system, ensuring that the calling program does not block
    > > > network traffic. If the SmtpServer property is set, the mail is
    > delivered
    > > > directly to the specified server.
    > > > </PleaseNote>
    > > >
    > > > You can specify which SMTP Server you would like to send your mail out
    > to.
    > > >
    > > > <Example>
    > > > Dim Message As New System.Web.Mail.MailMessage()
    > > > 'Recipient's name and e-mail address
    > > > Message.To = "Your Name <you@xxxxxxxx.com>"
    > > > 'Your name and e-mail address
    > > > Message.From = "Recipient Name <recipient@xxxxxxx.com>"
    > > > Message.Body = "Test message text"
    > > > Message.Subject = "A Test"
    > > > 'Your smtp server
    > > > System.Web.Mail.SmtpMail.SmtpServer = "mail.yourIntendedMailServer.com"
    > > > System.Web.Mail.SmtpMail.Send(Message)
    > > > </Example>
    > > >
    > > > hth
    > > >
    > > > --
    > > > William T
    > > > Chief Software Developer
    > > > Software Architect
    > > > Softwaremaker.Net Pte Ltd
    > > >
    > > > +++++++++++++++++++++++++++++
    > > >
    > > >
    > > > "Dominic Madden" <dominic@themaddens.info> wrote in message
    > > > news:OZN1iPkQDHA.1712@TK2MSFTNGP12.phx.gbl...
    > > > > Hi,
    > > > >
    > > > > Look at [url]http://sourceforge.net/projects/opensmtp-net/[/url] for a free open
    > source
    > > > > SMTP component.
    > > > >
    > > > > Dom
    > > > >
    > > > > "dave wanta" <nospam@nospam.com> wrote in message
    > > > > news:OIORCfZQDHA.3192@tk2msftngp13.phx.gbl...
    > > > > > Hi,
    > > > > > There isn't anyway of doing this with in System.Web.Mail, which is
    > one
    > of
    > > > > > the reasons why I wrote [url]www.aspNetEmail.com[/url]
    > > > > >
    > > > > > Sorry,
    > > > > > Dave
    > > > > > [url]www.aspNetEmail.com[/url]
    > > > > >
    > > > > >
    > > > > > "sampsons" <sampsons@airmail.net> wrote in message
    > > > > > news:be1uji$ple@library1.airnews.net...
    > > > > > > Greetings,
    > > > > > >
    > > > > > > I am using Web.Mail.Mailmessage
    > > > > > > along with Web.Mail.SmtpMail.Send(MailMessage) method
    > > > > > >
    > > > > > > Now, this sends Email using the Default SMTP server of my REMOTE
    > HOST.
    > > > > > >
    > > > > > > Sadly I have found that many ISP's block mail sent through this
    > method.
    > > > > > > I do have an SMTP server included in the Remote Hosting package,
    > > > > > > but that SmtpServer requires authentication of outgoing mail.
    > > > > > >
    > > > > > > If I set the SmtpServer property to my domain's SmtpServer
    > > > > > > then the mail is never sent because it is not authenticated
    > > > > > > with the username and password of the account I am using
    > > > > > > as the MailMessage.To property.
    > > > > > >
    > > > > > > Is there a way to pass the username and password of the
    > > > > > > account used to send the message through
    > Web.Mail.SmtpMail.SmtpServer
    > > > > > > property??
    > > > > > >
    > > > > > > Thanks in advance,
    > > > > > > Severin Sampson
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    Michael Harder Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139