bman9111
asked on
sending email in vb.net
I am using
Imports System.Web.Mail
but when a user with 98 tries to run my program it gives an error stating:
This operation requires Windows NT, Windows 2000, or Windows XP.
Is there a fix for this problem. Meaning something I need to download on a 98 pc or does this mean I have to go back to the old outlook com way
Imports System.Web.Mail
but when a user with 98 tries to run my program it gives an error stating:
This operation requires Windows NT, Windows 2000, or Windows XP.
Is there a fix for this problem. Meaning something I need to download on a 98 pc or does this mean I have to go back to the old outlook com way
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this is my code
Dim Mail As MailMessage
Try
Mail = New MailMessage
Mail .BodyFormat = MailFormat.Text
Mail .From = "from@aol.com
Mail .To = "user@aol.com"
Mail .Subject = "Email"
Mail .Body = "Hello"
SmtpMail.SmtpServer = "192.168.0.102"
SmtpMail.Send(Mail )
Catch ex As Exception
MessageBox.Show(ex.Message , "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Bu tton1)
End Try
Dim Mail As MailMessage
Try
Mail = New MailMessage
Mail .BodyFormat = MailFormat.Text
Mail .From = "from@aol.com
Mail .To = "user@aol.com"
Mail .Subject = "Email"
Mail .Body = "Hello"
SmtpMail.SmtpServer = "192.168.0.102"
SmtpMail.Send(Mail )
Catch ex As Exception
MessageBox.Show(ex.Message
End Try
It will not work on Win98!
From the .Net help file
Requirements
Namespace: System.Web.Mail
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
Assembly: System.Web (in System.Web.dll)
Requirements
Namespace: System.Web.Mail
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
Assembly: System.Web (in System.Web.dll)
ASKER
ok that is what I thought, just wanted to check to see If I might have done something wrong. I guess I will have to go back to the outlook com way. Thanks
give a try to FreeSMTP. You will have other problems with Outlook ( a confirmation message box will need to be acknowledge everytime you will send an e-mail).
SmtpMail.SmtpServer="local
If they don't have a mail server running it won't run. You may be able to specify remote mail server.