|
-
Sep 9th, 2005, 07:19 AM
#1
Thread Starter
Fanatic Member
why is this email not sending
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 = "[email protected]"
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 nice
it works 60% of the time, all the time.
-
Sep 9th, 2005, 10:05 AM
#2
Hyperactive Member
Re: why is this email not sending
What error are you getting?
-
Sep 9th, 2005, 02:02 PM
#3
PowerPoster
Re: why is this email not sending
i bet its the typical CDOSYS (or something like that) error msg...
-
Sep 9th, 2005, 03:38 PM
#4
Hyperactive Member
Re: why is this email not sending
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.
-
Sep 10th, 2005, 05:10 AM
#5
Thread Starter
Fanatic Member
Re: why is this email not sending
im not getting no errors guys
how do you name the smtp server
it works 60% of the time, all the time.
-
Sep 13th, 2005, 06:13 AM
#6
Thread Starter
Fanatic Member
Re: why is this email not sending
suprisingly enough this still isnt working
anyone any inspiring ideas
VB Code:
Private Sub CompRegConfirmation()
Dim msg As New MailMessage
msg.Subject = " Company registered"
msg.Body = txtUsername.Text
msg.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg)
End Sub
it works 60% of the time, all the time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|