Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SmtpServer Property

Reply
Thread Tools

SmtpServer Property

 
 
sampsons
Guest
Posts: n/a
 
      07-03-2003
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


 
Reply With Quote
 
 
 
 
dave wanta
Guest
Posts: n/a
 
      07-03-2003
Hi,
There isn't anyway of doing this with in System.Web.Mail, which is one of
the reasons why I wrote www.aspNetEmail.com

Sorry,
Dave
www.aspNetEmail.com


"sampsons" <> wrote in message
news:be1uji$...
> 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
>
>



 
Reply With Quote
 
 
 
 
Dominic Madden
Guest
Posts: n/a
 
      07-04-2003
Hi,

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

Dom

"dave wanta" <> wrote in message
news:...
> Hi,
> There isn't anyway of doing this with in System.Web.Mail, which is one of
> the reasons why I wrote www.aspNetEmail.com
>
> Sorry,
> Dave
> www.aspNetEmail.com
>
>
> "sampsons" <> wrote in message
> news:be1uji$...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Al
Guest
Posts: n/a
 
      07-04-2003
Why not use cdosys.dll?

--
remove underscores to email

"sampsons" <> wrote in message
news:be1uji$...
> 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
>
>



 
Reply With Quote
 
Softwaremaker
Guest
Posts: n/a
 
      07-04-2003
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 <>"
'Your name and e-mail address
Message.From = "Recipient Name <>"
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" <> wrote in message
news:...
> Hi,
>
> Look at http://sourceforge.net/projects/opensmtp-net/ for a free open

source
> SMTP component.
>
> Dom
>
> "dave wanta" <> wrote in message
> news:...
> > Hi,
> > There isn't anyway of doing this with in System.Web.Mail, which is one

of
> > the reasons why I wrote www.aspNetEmail.com
> >
> > Sorry,
> > Dave
> > www.aspNetEmail.com
> >
> >
> > "sampsons" <> wrote in message
> > news:be1uji$...
> > > 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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
sampsons
Guest
Posts: n/a
 
      07-09-2003
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" <> wrote in message
news:ey$...
> 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 <>"
> 'Your name and e-mail address
> Message.From = "Recipient Name <>"
> 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" <> wrote in message
> news:...
> > Hi,
> >
> > Look at http://sourceforge.net/projects/opensmtp-net/ for a free open

> source
> > SMTP component.
> >
> > Dom
> >
> > "dave wanta" <> wrote in message
> > news:...
> > > Hi,
> > > There isn't anyway of doing this with in System.Web.Mail, which is one

> of
> > > the reasons why I wrote www.aspNetEmail.com
> > >
> > > Sorry,
> > > Dave
> > > www.aspNetEmail.com
> > >
> > >
> > > "sampsons" <> wrote in message
> > > news:be1uji$...
> > > > 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
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      07-09-2003
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" <> wrote in message
news:behl5f$...
> 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" <> wrote in message
> news:ey$...
> > 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 <>"
> > 'Your name and e-mail address
> > Message.From = "Recipient Name <>"
> > 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" <> wrote in message
> > news:...
> > > Hi,
> > >
> > > Look at http://sourceforge.net/projects/opensmtp-net/ for a free open

> > source
> > > SMTP component.
> > >
> > > Dom
> > >
> > > "dave wanta" <> wrote in message
> > > news:...
> > > > Hi,
> > > > There isn't anyway of doing this with in System.Web.Mail, which is

one
> > of
> > > > the reasons why I wrote www.aspNetEmail.com
> > > >
> > > > Sorry,
> > > > Dave
> > > > www.aspNetEmail.com
> > > >
> > > >
> > > > "sampsons" <> wrote in message
> > > > news:be1uji$...
> > > > > 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
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Michael Harder
Guest
Posts: n/a
 
      07-11-2003
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:
http://msdn.microsoft.com/library/de...nformation.asp

"bruce barker" <> wrote in message news:<>...
> 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" <> wrote in message
> news:behl5f$...
> > 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" <> wrote in message
> > news:ey$...
> > > 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 <>"
> > > 'Your name and e-mail address
> > > Message.From = "Recipient Name <>"
> > > 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" <> wrote in message
> > > news:...
> > > > Hi,
> > > >
> > > > Look at http://sourceforge.net/projects/opensmtp-net/ for a free open

> source
> > > > SMTP component.
> > > >
> > > > Dom
> > > >
> > > > "dave wanta" <> wrote in message
> > > > news:...
> > > > > Hi,
> > > > > There isn't anyway of doing this with in System.Web.Mail, which is

> one
> of
> > > > > the reasons why I wrote www.aspNetEmail.com
> > > > >
> > > > > Sorry,
> > > > > Dave
> > > > > www.aspNetEmail.com
> > > > >
> > > > >
> > > > > "sampsons" <> wrote in message
> > > > > news:be1uji$...
> > > > > > 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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
smtpmail.smtpserver.insert EO ASP .Net 0 03-02-2005 06:51 PM
smtpmail.smtpserver question Bob Cummings ASP .Net 3 04-20-2004 01:30 PM
smtpserver Bruno ASP .Net 0 01-20-2004 08:20 PM
set user & passwd for SmtpMail.SmtpServer? Michael Appelmans ASP .Net 0 10-30-2003 02:40 PM
Sending mail to Hotmail - Using Smtpserver Jayakumar ASP .Net 1 08-12-2003 10:59 AM



Advertisments
 



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