Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Email via SMTP
Message
 
To
10/11/2003 15:41:12
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00848475
Message ID:
00848484
Views:
14
Jim,

That message is the catch all for SMTP. Put a Try around the problem code and look at the error's inner message. That should give you more information. Did you setup network relay permissions on IIS for your IP address?

>All,
>
> I have a website that sends vistors email via SMTP. The SMTP service is running on the server, but I am getting an error message when I call the send command of the smtp object. The error message is: "Could not access 'CDO.Message' object". My code is below,
>
>IMPORTS System.web.mail
>.....
>Private Sub SendEmail()
> Dim oMsg As New MailMessage()
> Dim strFile1 As String
> Dim strFile2 As String
>
> strFile1 = Server.MapPath("mydoc.doc")
> strFile2 = Server.MapPath("mydoc2.doc")
> Dim oAttchmnt1 As MailAttachment = New MailAttachment(strFile1, MailEncoding.Base64)
> Dim oAttchment2 As MailAttachment = New MailAttachment(strFile2, MailEncoding.Base64)
>
> With oMsg
> .From = "JimRieck@yahoo.com"
> .To = txtEmail.Text
> .Subject = ""
> .BodyFormat = MailFormat.Text
> .Attachments.Add(oAttchmnt1)
> .Attachments.Add(oAttchmnt2)
> End With
> SmtpMail.SmtpServer = "localhost"
> SmtpMail.Send(oMsg)
>End Sub
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform