-
emailing problem??
REF:Windows application in VB.net
I have added areference to the system.web.dll but whenever I add
Imports System.Web.Mail
to the top of my page the "imports" section ends up with a wavy blue line underneath it.
I take it this means there is a problem.
Can anyone help?
-
By moving the Imports line to the very top of my page, above public class form I have solved that problem but now I find that while my code for sending an email does not throw up any errors It does not send the email either.
:mad:
Any ideas?
Heres the code:
Dim mm As New MailMessage()
mm.From = "[email protected]"
mm.To = "[email protected]"
mm.Priority = MailPriority.High
mm.Subject = "Reorder Notification"
mm.Body = "The following stock items require reordering:" & vbCrLf & vbCrLf & myMessage
SmtpMail.Send(mm)
-
what properties did you set for what smtp server to conenct to? Make sure that is correct. And double check your email address you are sending to. and probably from as I believe you need a valid from mail account as defined on the smtp server you connect to.
-
Go To: http://www.jamesrking.com/left_brain...ding_email.asp
I used the link above for info and setup email through vb and it works great.