By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

smtp

P: n/a
JD
Is it possible using the smtp class in asp.net to send emails and
authenticate to the mail server that is sending the emails out.

Currently I have a web application that works fine on my machine, will send
email to both my company email addresses and to non-company email addresses.
However, as soon as I move the app into the production server it does not
send email to non company email addresses. What I mean by company is our
domain could @domain.com and it will work fine sending emails to any one
with that email address, but anyone without that in their email address and
it crashes. Any help on this would be appreciated.

--
J. D
Nov 19 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Private Sub Command1_Click()
Dim Mail As CDO.Message
Dim Conf As CDO.Configuration
Set Mail = New CDO.Message
Set Conf = New CDO.Configuration
With Conf
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")
= CDO.CdoSendUsing.cdoSendUsingPort
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "your_mail_server_here"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1") 'basic authentication
.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"my_username_here") 'set your username here
.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"super_secret") 'set your password here
End With
With Mail
.Configuration = Conf
.From = "your_email_addr"
.To = "target_email_addr"
.Subject = "Testing"
.HTMLBody = "As title"
.Sender = "your_email_addr"
.Send
End With
End Sub

"JD" <jd****@dalys.us> glsD:uC**************@TK2MSFTNGP15.phx.g bl...
Is it possible using the smtp class in asp.net to send emails and
authenticate to the mail server that is sending the emails out.

Currently I have a web application that works fine on my machine, will
send email to both my company email addresses and to non-company email
addresses. However, as soon as I move the app into the production server
it does not send email to non company email addresses. What I mean by
company is our domain could @domain.com and it will work fine sending
emails to any one with that email address, but anyone without that in
their email address and it crashes. Any help on this would be appreciated.

--
J. D

Nov 19 '05 #2

P: n/a
JD
Lau Lei

Thanks for the quick reply, my bad for not pointing this out but this
was using asp.net and not visual basic.

See code down below

'Put user code to initialize the page here
Dim oMail As System.Web.Mail.SmtpMail
Dim oMailMsg As New System.Web.Mail.MailMessage
Dim sServer As String
Dim sMsgBody As New System.Text.StringBuilder
Dim sAutoMsgBody As New System.Text.StringBuilder
Try

'Check to see if there is any postback, if there is none
then send the message
If Not IsPostBack Then
With oMail
'Set the mail server name
.SmtpServer =
ConfigurationSettings.AppSettings("SmtpServer")

'Get the name of the server that this resides on
sServer = Request.ServerVariables("SERVER_NAME")
With oMailMsg

'Set the body format
.BodyFormat = Mail.MailFormat.Html
'Set the body content
With sMsgBody
.Append("Form Name:" &
Request.Form("FormName") & "<br>")
.Append("<br>")
.Append("First Name: " &
Request.Form("FirstName") & "<br>")
End With

.Body = sMsgBody.ToString() & vbCrLf & "Server:
" & sServer
''Automate response email
'With sAutoMsgBody
' .Append("<p>blah blah</p>")
' .Append("<br>")
'End With

'With oMailMsg
' 'Take it from the email address that was
entered on the contact form
' .To = Request.Form("email")
' 'Set the body format
' .BodyFormat = Mail.MailFormat.Html
' 'Subject line
' .Subject = "Automated response"
' 'From address
' .From =
ConfigurationSettings.AppSettings("CustFromSite")
' 'Body
' .Body = sAutoMsgBody.ToString()
'End With
''Send the email
'.Send(oMailMsg)

End With
'Clean up
oMail = Nothing
oMailMsg = Nothing
sMsgBody = Nothing
'Check to see if this is going to a custom thank you
page or not
If Len(Request.Form("RedirectPath")) > 0 Then
'Redirect the site to the custom thank you page
Response.Redirect(Request.Form("RedirectPath"))
End If

End If
Catch ex As Exception
'To be done yet
Response.Write(ex.Message)
Response.Write(ex.StackTrace)

End Try
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #3

P: n/a
It doesn't really matter.

First of all you should know System.Web.Mail is just a wrapper over CDO
objects.

And then MailMessage also have property called "Fields" that you can use.

Just use the field names in the example to fill in the information.

"JD" <wo**@dalyse.us> ???????:eY**************@TK2MSFTNGP09.phx.gbl...
Lau Lei

Thanks for the quick reply, my bad for not pointing this out but this
was using asp.net and not visual basic.

See code down below

'Put user code to initialize the page here
Dim oMail As System.Web.Mail.SmtpMail
Dim oMailMsg As New System.Web.Mail.MailMessage
Dim sServer As String
Dim sMsgBody As New System.Text.StringBuilder
Dim sAutoMsgBody As New System.Text.StringBuilder
Try

'Check to see if there is any postback, if there is none
then send the message
If Not IsPostBack Then
With oMail
'Set the mail server name
.SmtpServer =
ConfigurationSettings.AppSettings("SmtpServer")

'Get the name of the server that this resides on
sServer = Request.ServerVariables("SERVER_NAME")
With oMailMsg

'Set the body format
.BodyFormat = Mail.MailFormat.Html
'Set the body content
With sMsgBody
.Append("Form Name:" &
Request.Form("FormName") & "<br>")
.Append("<br>")
.Append("First Name: " &
Request.Form("FirstName") & "<br>")
End With

.Body = sMsgBody.ToString() & vbCrLf & "Server:
" & sServer
''Automate response email
'With sAutoMsgBody
' .Append("<p>blah blah</p>")
' .Append("<br>")
'End With

'With oMailMsg
' 'Take it from the email address that was
entered on the contact form
' .To = Request.Form("email")
' 'Set the body format
' .BodyFormat = Mail.MailFormat.Html
' 'Subject line
' .Subject = "Automated response"
' 'From address
' .From =
ConfigurationSettings.AppSettings("CustFromSite")
' 'Body
' .Body = sAutoMsgBody.ToString()
'End With
''Send the email
'.Send(oMailMsg)

End With
'Clean up
oMail = Nothing
oMailMsg = Nothing
sMsgBody = Nothing
'Check to see if this is going to a custom thank you
page or not
If Len(Request.Form("RedirectPath")) > 0 Then
'Redirect the site to the custom thank you page
Response.Redirect(Request.Form("RedirectPath"))
End If

End If
Catch ex As Exception
'To be done yet
Response.Write(ex.Message)
Response.Write(ex.StackTrace)

End Try
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 19 '05 #4

P: n/a
JD,

I think the problem is : The production server requires authentication
before you can send a mail using a specific email Id.

In ASP .Net there is no direct way to achieve this, so the solution Lau has
suggested can be implemented in ASP .Net by adding a reference to the COM
object.

"JD" wrote:
Lau Lei

Thanks for the quick reply, my bad for not pointing this out but this
was using asp.net and not visual basic.

See code down below

'Put user code to initialize the page here
Dim oMail As System.Web.Mail.SmtpMail
Dim oMailMsg As New System.Web.Mail.MailMessage
Dim sServer As String
Dim sMsgBody As New System.Text.StringBuilder
Dim sAutoMsgBody As New System.Text.StringBuilder
Try

'Check to see if there is any postback, if there is none
then send the message
If Not IsPostBack Then
With oMail
'Set the mail server name
.SmtpServer =
ConfigurationSettings.AppSettings("SmtpServer")

'Get the name of the server that this resides on
sServer = Request.ServerVariables("SERVER_NAME")
With oMailMsg

'Set the body format
.BodyFormat = Mail.MailFormat.Html
'Set the body content
With sMsgBody
.Append("Form Name:" &
Request.Form("FormName") & "<br>")
.Append("<br>")
.Append("First Name: " &
Request.Form("FirstName") & "<br>")
End With

.Body = sMsgBody.ToString() & vbCrLf & "Server:
" & sServer
''Automate response email
'With sAutoMsgBody
' .Append("<p>blah blah</p>")
' .Append("<br>")
'End With

'With oMailMsg
' 'Take it from the email address that was
entered on the contact form
' .To = Request.Form("email")
' 'Set the body format
' .BodyFormat = Mail.MailFormat.Html
' 'Subject line
' .Subject = "Automated response"
' 'From address
' .From =
ConfigurationSettings.AppSettings("CustFromSite")
' 'Body
' .Body = sAutoMsgBody.ToString()
'End With
''Send the email
'.Send(oMailMsg)

End With
'Clean up
oMail = Nothing
oMailMsg = Nothing
sMsgBody = Nothing
'Check to see if this is going to a custom thank you
page or not
If Len(Request.Form("RedirectPath")) > 0 Then
'Redirect the site to the custom thank you page
Response.Redirect(Request.Form("RedirectPath"))
End If

End If
Catch ex As Exception
'To be done yet
Response.Write(ex.Message)
Response.Write(ex.StackTrace)

End Try
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 19 '05 #5

P: n/a
JD
Okay, could you give me an example of how it would look, I am trying and I
am getting some weird looking results.

CDO.CdoSendUsing.cdoSendUsingPort - Where does this come from?
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")
= CDO.CdoSendUsing.cdoSendUsingPort
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "your_mail_server_here"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1") 'basic authentication
.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"my_username_here") 'set your username here
.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"super_secret") 'set your password here
"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:OW**************@tk2msftngp13.phx.gbl...
It doesn't really matter.

First of all you should know System.Web.Mail is just a wrapper over CDO
objects.

And then MailMessage also have property called "Fields" that you can use.

Just use the field names in the example to fill in the information.

"JD" <wo**@dalyse.us> ???????:eY**************@TK2MSFTNGP09.phx.gbl...
Lau Lei

Thanks for the quick reply, my bad for not pointing this out but this
was using asp.net and not visual basic.

See code down below

'Put user code to initialize the page here
Dim oMail As System.Web.Mail.SmtpMail
Dim oMailMsg As New System.Web.Mail.MailMessage
Dim sServer As String
Dim sMsgBody As New System.Text.StringBuilder
Dim sAutoMsgBody As New System.Text.StringBuilder
Try

'Check to see if there is any postback, if there is none
then send the message
If Not IsPostBack Then
With oMail
'Set the mail server name
.SmtpServer =
ConfigurationSettings.AppSettings("SmtpServer")

'Get the name of the server that this resides on
sServer = Request.ServerVariables("SERVER_NAME")
With oMailMsg

'Set the body format
.BodyFormat = Mail.MailFormat.Html
'Set the body content
With sMsgBody
.Append("Form Name:" &
Request.Form("FormName") & "<br>")
.Append("<br>")
.Append("First Name: " &
Request.Form("FirstName") & "<br>")
End With

.Body = sMsgBody.ToString() & vbCrLf & "Server:
" & sServer
''Automate response email
'With sAutoMsgBody
' .Append("<p>blah blah</p>")
' .Append("<br>")
'End With

'With oMailMsg
' 'Take it from the email address that was
entered on the contact form
' .To = Request.Form("email")
' 'Set the body format
' .BodyFormat = Mail.MailFormat.Html
' 'Subject line
' .Subject = "Automated response"
' 'From address
' .From =
ConfigurationSettings.AppSettings("CustFromSite")
' 'Body
' .Body = sAutoMsgBody.ToString()
'End With
''Send the email
'.Send(oMailMsg)

End With
'Clean up
oMail = Nothing
oMailMsg = Nothing
sMsgBody = Nothing
'Check to see if this is going to a custom thank you
page or not
If Len(Request.Form("RedirectPath")) > 0 Then
'Redirect the site to the custom thank you page
Response.Redirect(Request.Form("RedirectPath"))
End If

End If
Catch ex As Exception
'To be done yet
Response.Write(ex.Message)
Response.Write(ex.StackTrace)

End Try
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com


Nov 19 '05 #6

P: n/a
JD
It would seem that you may be right

..Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

..Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").values
= "mail.nemo.com"

..Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").values
= 25

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1") 'basic authentication

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"crush") 'set your username here

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"totallydude") 'set your password here

it fails on the first line above and I get the error message down below

Object variable or With block variable not set. at
Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateSet(Object o,
Type& objType, String name, Object[] args, String[] paramnames, Boolean
OptimisticSet, CallType UseCallType) at
Microsoft.VisualBasic.CompilerServices.LateBinding .LateSetComplex(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean
OptimisticSet, Boolean RValueBase) at
blueconnect.sendmail.Page_PreRender(Object sender, EventArgs e) in
C:\projects\Docroot\OtherClients\jci\app_includes\ sendmail.aspx.vb:line 49

"Mayur Shah" <Mayur Sh**@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
JD,

I think the problem is : The production server requires authentication
before you can send a mail using a specific email Id.

In ASP .Net there is no direct way to achieve this, so the solution Lau
has
suggested can be implemented in ASP .Net by adding a reference to the COM
object.

"JD" wrote:
Lau Lei

Thanks for the quick reply, my bad for not pointing this out but this
was using asp.net and not visual basic.

See code down below

'Put user code to initialize the page here
Dim oMail As System.Web.Mail.SmtpMail
Dim oMailMsg As New System.Web.Mail.MailMessage
Dim sServer As String
Dim sMsgBody As New System.Text.StringBuilder
Dim sAutoMsgBody As New System.Text.StringBuilder
Try

'Check to see if there is any postback, if there is none
then send the message
If Not IsPostBack Then
With oMail
'Set the mail server name
.SmtpServer =
ConfigurationSettings.AppSettings("SmtpServer")

'Get the name of the server that this resides on
sServer = Request.ServerVariables("SERVER_NAME")
With oMailMsg

'Set the body format
.BodyFormat = Mail.MailFormat.Html
'Set the body content
With sMsgBody
.Append("Form Name:" &
Request.Form("FormName") & "<br>")
.Append("<br>")
.Append("First Name: " &
Request.Form("FirstName") & "<br>")
End With

.Body = sMsgBody.ToString() & vbCrLf & "Server:
" & sServer
''Automate response email
'With sAutoMsgBody
' .Append("<p>blah blah</p>")
' .Append("<br>")
'End With

'With oMailMsg
' 'Take it from the email address that was
entered on the contact form
' .To = Request.Form("email")
' 'Set the body format
' .BodyFormat = Mail.MailFormat.Html
' 'Subject line
' .Subject = "Automated response"
' 'From address
' .From =
ConfigurationSettings.AppSettings("CustFromSite")
' 'Body
' .Body = sAutoMsgBody.ToString()
'End With
''Send the email
'.Send(oMailMsg)

End With
'Clean up
oMail = Nothing
oMailMsg = Nothing
sMsgBody = Nothing
'Check to see if this is going to a custom thank you
page or not
If Len(Request.Form("RedirectPath")) > 0 Then
'Redirect the site to the custom thank you page
Response.Redirect(Request.Form("RedirectPath"))
End If

End If
Catch ex As Exception
'To be done yet
Response.Write(ex.Message)
Response.Write(ex.StackTrace)

End Try
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 19 '05 #7

P: n/a
This works for me (and no COM wrapper stuff or CDO objects needed):

System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();
mail.To = destinationAddresses;
mail.From = fromAddress;
mail.Subject = subjectLine;
mail.Body = mailBody;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
m_SMTPLoginID); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
m_SMTPLoginPW); //set your password here
System.Web.Mail.SmtpMail.SmtpServer = m_SMTPMailServer; // e.g.,
"mail.MyDomain.com"; //your smtp server goes here
System.Web.Mail.SmtpMail.Send( mail );

-HTH

"JD" <jd****@dalys.us> wrote in message
news:Oa**************@TK2MSFTNGP14.phx.gbl...
It would seem that you may be right

.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").values
= "mail.nemo.com"

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").values
= 25

.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1") 'basic authentication

.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"crush") 'set your username here

.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"totallydude") 'set your password here

it fails on the first line above and I get the error message down below

Object variable or With block variable not set. at
Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateSet(Object
o, Type& objType, String name, Object[] args, String[] paramnames, Boolean
OptimisticSet, CallType UseCallType) at
Microsoft.VisualBasic.CompilerServices.LateBinding .LateSetComplex(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean
OptimisticSet, Boolean RValueBase) at
blueconnect.sendmail.Page_PreRender(Object sender, EventArgs e) in
C:\projects\Docroot\OtherClients\jci\app_includes\ sendmail.aspx.vb:line 49

"Mayur Shah" <Mayur Sh**@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
JD,

I think the problem is : The production server requires authentication
before you can send a mail using a specific email Id.

In ASP .Net there is no direct way to achieve this, so the solution Lau
has
suggested can be implemented in ASP .Net by adding a reference to the COM
object.

"JD" wrote:
Lau Lei

Thanks for the quick reply, my bad for not pointing this out but this
was using asp.net and not visual basic.

See code down below

'Put user code to initialize the page here
Dim oMail As System.Web.Mail.SmtpMail
Dim oMailMsg As New System.Web.Mail.MailMessage
Dim sServer As String
Dim sMsgBody As New System.Text.StringBuilder
Dim sAutoMsgBody As New System.Text.StringBuilder
Try

'Check to see if there is any postback, if there is none
then send the message
If Not IsPostBack Then
With oMail
'Set the mail server name
.SmtpServer =
ConfigurationSettings.AppSettings("SmtpServer")

'Get the name of the server that this resides on
sServer = Request.ServerVariables("SERVER_NAME")
With oMailMsg

'Set the body format
.BodyFormat = Mail.MailFormat.Html
'Set the body content
With sMsgBody
.Append("Form Name:" &
Request.Form("FormName") & "<br>")
.Append("<br>")
.Append("First Name: " &
Request.Form("FirstName") & "<br>")
End With

.Body = sMsgBody.ToString() & vbCrLf & "Server:
" & sServer
''Automate response email
'With sAutoMsgBody
' .Append("<p>blah blah</p>")
' .Append("<br>")
'End With

'With oMailMsg
' 'Take it from the email address that was
entered on the contact form
' .To = Request.Form("email")
' 'Set the body format
' .BodyFormat = Mail.MailFormat.Html
' 'Subject line
' .Subject = "Automated response"
' 'From address
' .From =
ConfigurationSettings.AppSettings("CustFromSite")
' 'Body
' .Body = sAutoMsgBody.ToString()
'End With
''Send the email
'.Send(oMailMsg)

End With
'Clean up
oMail = Nothing
oMailMsg = Nothing
sMsgBody = Nothing
'Check to see if this is going to a custom thank you
page or not
If Len(Request.Form("RedirectPath")) > 0 Then
'Redirect the site to the custom thank you page
Response.Redirect(Request.Form("RedirectPath"))
End If

End If
Catch ex As Exception
'To be done yet
Response.Write(ex.Message)
Response.Write(ex.StackTrace)

End Try
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com


Nov 19 '05 #8

P: n/a
JD
Thanks everyone, I was able to get it work after I tried out Jeremy S.
suggestion, learn something new tonight or morning or whatever time it is
now. Issue closed.
"JD" <jd****@dalys.us> wrote in message
news:uC**************@TK2MSFTNGP15.phx.gbl...
Is it possible using the smtp class in asp.net to send emails and
authenticate to the mail server that is sending the emails out.

Currently I have a web application that works fine on my machine, will
send email to both my company email addresses and to non-company email
addresses. However, as soon as I move the app into the production server
it does not send email to non company email addresses. What I mean by
company is our domain could @domain.com and it will work fine sending
emails to any one with that email address, but anyone without that in
their email address and it crashes. Any help on this would be appreciated.

--
J. D

Nov 19 '05 #9

P: n/a
Keep in mind that the method I showed to you is officially "undocumented" -
meaning it might not be supported in the future. I suspect that's why this
solution is rarely recommended.

I'm sure the MVPs around here are aware of this undocumented solution - but
they don't recommend it - and probably for good reason. I'd be interested in
knowing why. This question is posed with some regularity and they always
seem to recommend some more complicated method that relies on CDO/COM
wrapper-based solution.

-JS
"JD" <jd****@dalys.us> wrote in message
news:OL**************@TK2MSFTNGP14.phx.gbl...
Thanks everyone, I was able to get it work after I tried out Jeremy S.
suggestion, learn something new tonight or morning or whatever time it is
now. Issue closed.
"JD" <jd****@dalys.us> wrote in message
news:uC**************@TK2MSFTNGP15.phx.gbl...
Is it possible using the smtp class in asp.net to send emails and
authenticate to the mail server that is sending the emails out.

Currently I have a web application that works fine on my machine, will
send email to both my company email addresses and to non-company email
addresses. However, as soon as I move the app into the production server
it does not send email to non company email addresses. What I mean by
company is our domain could @domain.com and it will work fine sending
emails to any one with that email address, but anyone without that in
their email address and it crashes. Any help on this would be
appreciated.

--
J. D


Nov 19 '05 #10

P: n/a
Hi, Jeremy.

re:
I'm sure the MVPs around here are aware of this undocumented solution - but they don't
recommend it - and probably for good reason.
The only reason to use that is if the smtp server needs authentication.

I've sent quite a few references to this FAQ page in response
to questions about sending authenticated smtp mail:

http://www.systemwebmail.com/faq/3.8.aspx

If the server doesn't need authenticacion, the standard, less complicated,
methods of sending mail ( the "wrappers" you refer to ) work just fine,
so why introduce complicated schema code if there's no need for it ?

The best reference site for system.web.mail is this FAQ :

http://www.systemwebmail.com/faq.aspx

I don't think I've come up with a problem not documented/solved there.


Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"Jeremy S." <A@B.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Keep in mind that the method I showed to you is officially "undocumented" - meaning it
might not be supported in the future. I suspect that's why this solution is rarely
recommended.

I'm sure the MVPs around here are aware of this undocumented solution - but they don't
recommend it - and probably for good reason. I'd be interested in knowing why. This
question is posed with some regularity and they always seem to recommend some more
complicated method that relies on CDO/COM wrapper-based solution.

-JS
"JD" <jd****@dalys.us> wrote in message news:OL**************@TK2MSFTNGP14.phx.gbl...
Thanks everyone, I was able to get it work after I tried out Jeremy S. suggestion,
learn something new tonight or morning or whatever time it is now. Issue closed.
"JD" <jd****@dalys.us> wrote in message news:uC**************@TK2MSFTNGP15.phx.gbl...
Is it possible using the smtp class in asp.net to send emails and authenticate to the
mail server that is sending the emails out.

Currently I have a web application that works fine on my machine, will send email to
both my company email addresses and to non-company email addresses. However, as soon
as I move the app into the production server it does not send email to non company
email addresses. What I mean by company is our domain could @domain.com and it will
work fine sending emails to any one with that email address, but anyone without that
in their email address and it crashes. Any help on this would be appreciated.

--
J. D



Nov 19 '05 #11

P: n/a
JD
thanks, I will keep that in mind

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.