sending an asp.net mail (1 Viewer)

wagae

New member
Local time
Today, 08:02
Joined
Jul 5, 2006
Messages
5
Hi everyone. please help me, i am trying to send an email from a web form in asp.net
this is what i have

Dim objMM As New MailMessage

objMM.To = "mail@mymail.com"
objMM.From = "mail@mymail.com"

objMM.Cc = "mail@mymail.com"
objMM.Bcc = "mail@mymail.com"

objMM.BodyFormat = MailFormat.Text
objMM.Priority = MailPriority.Normal

objMM.Subject = "Hello!"

objMM.Body = "Please NOTE" & vbCrLf & vbCrLf & "testing email."
SmtpMail.Send(objMM)
when debugging, everything is right until the
SmtpMail.Send(objMM), i get this "Expression does not produce a value."
am i doing something wrong?
thank you
 

dan-cat

Registered User.
Local time
Today, 16:02
Joined
Jun 2, 2002
Messages
3,433
You haven't created your SmtpMail object

Code:
Dim objMM As New MailMessage
[COLOR="red"]Dim mySMTP As New SmtpMail[/COLOR]

objMM.To = "mail@mymail.com"
objMM.From = "mail@mymail.com"

objMM.Cc = "mail@mymail.com"
objMM.Bcc = "mail@mymail.com"

objMM.BodyFormat = MailFormat.Text
objMM.Priority = MailPriority.Normal

objMM.Subject = "Hello!"

objMM.Body = "Please NOTE" & vbCrLf & vbCrLf & "testing email."

[COLOR="Red"]mySMTP.Send(objMM)[/COLOR]
 

mercy

Registered User.
Local time
Today, 08:02
Joined
Aug 4, 2006
Messages
10
I dont think that by using this solution, u get the remedy.
 

dan-cat

Registered User.
Local time
Today, 16:02
Joined
Jun 2, 2002
Messages
3,433
I think you're right - here is an article that addresses the issue
 

Users who are viewing this thread

Top Bottom