Re: System.Web.Mail.Smtp namespace
- From: "Carlos J. Quintero [.NET MVP]" <carlosq@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 17:00:45 +0200
Have you looked at http://systemwebmail.com/ ?
They have a section for troubleshooting...
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
"marcmc" <marcmc@xxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el mensaje
news:C9BAB947-472C-4402-BBF3-E58F41842315@xxxxxxxxxxxxxxxx
> Trying to send an eMail frommy vb.net App.
> Is there anybody out there that has successfully done this?
> I am having major problems and need a step by step guide into the world of
> system.web and IIS. The reading I have done(alot) has been pretty useless
> in
> helping me understand the various bits required.
>
> The error I get is: On a pc running win2k with IIS and Lotus Notes
> System.Runtime.InteropServices.SEHException: External component has thrown
> an Exception
> at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
> at System.Activator.CreateInstance(Type type, Boolean nonPublic)
> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
> at System.Web.Mail/SmtpMail.Send(MailMessage message)
> at MyAppName.MyFormName.MyMailingFunction
>
> The error I get is: On a DEV(not networked) pc running winXP with with IIS
> but without Lotus Notes
>
> System.Web.HttpException: Could not access 'CDO.Message' object ---->
> System.Reflection.TargetInvocationexception: Exception has been thrown by
> the target of an invocation --->
> System.Runtime.InteropServices.COMException(0x80040213): The transport
> failed to connect to the server
>
>
>
> CODE:::
> Imports System.Web.Mail
>
> Private Sub Mail1()
> Dim myMessage As New MailMessage
> Dim myMailServer As SmtpMail
>
> myMessage.BodyFormat = MailFormat.Text 'or MailFormat.Html
> myMessage.Priority = MailPriority.Normal ', High, or Low
> myMessage.From = "marc.mcguckian@xxxxxxxxxxxxxxxx" 'From Address
> myMessage.To = "marc.mcguckian@xxxxxxxxxxxxxxxx" 'To Address
> 'myMessage.Cc = "someoneelse@xxxxxxxxxxxxxx" 'Send a Carbon-Copy
> 'myMessage.Bcc = "someone@xxxxxxxxxxxxxx" 'Send a Blind Carbon-Copy
> myMessage.Subject = "VB.NET E-mail Test"
> 'Below is the Body of the E-mail I did it this way to show that
> this
> property
> 'can be treated as a string.
> myMessage.Body = "This is a test of a Windows E-mailer<BR>" &
> vbCrLf
> myMessage.Body &= "<font color=blue>TEST</font><br>" & vbCrLf & _
> "<font color=red>TEST</font><br>" & vbCrLf
>
> 'Add an attachment to your Email. Attachments in Windows
> applications are touchy.
> 'In the project it will throw an error if you don't have the file
> in
> the
> 'Solution Explorer. But just running the .exe it seems to be fine
> with any file.
> 'Make sure file has full pathing otherwise you will definitely get
> an error.
> 'myMessage.Attachments.Add(New
> System.Web.Mail.MailAttachment(File))
>
> '10.2.0.4
> 'cavan02.quinn-direct.com)
>
> 'myMailServer.SmtpServer = "cavan02.quinn-direct.com" 'This is your
> mail server
> myMailServer.SmtpServer = "cn2k-03321.quinn-direct.com" 'This is
> your mail server
> Try
> myMailServer.Send(myMessage)
> Catch ex As Exception
> MessageBox.Show(ex.ToString)
> MessageBox.Show(ex.InnerException.ToString)
> MessageBox.Show(ex.Source)
> End Try
>
> myMessage = Nothing
> End Sub
.
- Follow-Ups:
- Re: System.Web.Mail.Smtp namespace
- From: marcmc
- Re: System.Web.Mail.Smtp namespace
- References:
- System.Web.Mail.Smtp namespace
- From: marcmc
- System.Web.Mail.Smtp namespace
- Prev by Date: Re: Panel like Visual Studio .NET
- Next by Date: Re: Intellisense question
- Previous by thread: System.Web.Mail.Smtp namespace
- Next by thread: Re: System.Web.Mail.Smtp namespace
- Index(es):
Relevant Pages
|