why is this email not sending
------------------------
setting up the email to send email when a button is clicked
check it out, no errors but no email either
Code:
Private Sub CompRegConfirmation()
Dim msg As New MailMessage
msg.From = "localhost"
msg.To = "someone@dotnet.itags.org.hotmail.com"
msg.Subject = " Company registered"
msg.Body = txtUsername.Text
msg.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg)
End Sub
i call this then in a button click event
compregconfirmation()
no joy
__________________
im a newbie so be niceWhat error are you getting?
i bet its the typical CDOSYS (or something like that) error msg...
My first thought was that he didn't have SMTP services running or something. I tried the code the way he pasted it and couldn't get it to work using localhost either. Once I named the SMTP server it worked fine. There must be a way to do it like that but I couldn't come up with the right way off the top of my head.
I didn't go that far into it or post more details because I wanted to know the error he was getting first.
im not getting no errors guys
how do you name the smtp server
suprisingly enough this still isnt working
anyone any inspiring ideas
Private Sub CompRegConfirmation()
Dim msg As New MailMessage
msg.From = "admin@.home.com"
msg.To = "me@.hotmail.com"
msg.Subject = " Company registered"
msg.Body = txtUsername.Text
msg.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg)
End Sub
Saturday, March 31, 2012
why is this email not sending
Labels:
----setting,
asp,
button,
clickedcheck,
email,
errors,
net,
sending
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment