Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : .NET : ASP.NET : smtp-server Signup · Login
Author Thread
smtp-server
Posted in tutorial: Sending Mass Emails using ASP.NET
·  hosbond
User
Joined: 26 Feb 2003
Total Posts: 1

smtp-server

Posted: 26 Feb 2003
Can you please help me.




Can you configure a smtp-server ( smtp.mail.dk )

Claus Hosbond

It på HTH
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 595
Re: smtp-server
Posted: 9 Aug 2003
No with the SmtpMail class discussed in the article, it is not possible to specify any server other than Microsoft SMTP Service running on the localhost.

You can try some commercial components (free ones are also available) or write your own (isn't difficult with .NET).

Hope it helps!

Faisal Khan.
Stardeveloper.com
Read Blog | Follow on Facebook, Twitter
·  Nabelrock
User
Joined: 22 Sep 2003
Total Posts: 2
Re: smtp-server
Posted: 22 Sep 2003
Try this...

Function sendEmail(ByVal sBody As String) As Boolean
Try
Dim oEmail As New System.Web.Mail.MailMessage()
oEmail.BodyFormat = Mail.MailFormat.Html
oEmail.Body = sBody
oEmail.From = "youraddress@somthin.com"
oEmail.To = "recipientsaddress@somthin.com"
oEmail.Subject = "Subject Text"
Dim oSendEmail As Web.Mail.SmtpMail
oSendEmail.SmtpServer = "localhost"
oSendEmail.Send(oEmail)
Return True
Catch ex As Exception
Return False
End Try
End Function
·  Nabelrock
User
Joined: 22 Sep 2003
Total Posts: 2
smtp-server
Posted: 22 Sep 2003
Try this...

Function sendEmail(ByVal sBody As String) As Boolean
Try
Dim oEmail As New System.Web.Mail.MailMessage()
oEmail.BodyFormat = Mail.MailFormat.Html
oEmail.Body = sBody
oEmail.From = "youraddress@somthin.com"
oEmail.To = "recipientsaddress@somthin.com"
oEmail.Subject = "Subject Text"
Dim oSendEmail As Web.Mail.SmtpMail
oSendEmail.SmtpServer = "localhost"
oSendEmail.Send(oEmail)
Return True
Catch ex As Exception
Return False
End Try
End Function
·  ss0979
User
Joined: 10 Nov 2004
Total Posts: 1
CDO.Message Error
Posted: 10 Nov 2004
When the MailFrom address is not in the same domain as of the SMTP Server then I am getting the error.Things work propoerly if To and From are in the same domain as of the SMTP server also if the To mail id is of other domain and the from mail id is in the same Domain as of SMTP it works. I am getting this error only when the From mail id is not of the same domain as of the SMTP server , can anyone help me ?

SMTP Server = 'something.com'
To = 'a@somthing.com'
From = 'b@otherDomain.com'
Gives above error.
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
4 Visitors

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.