Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
Automated Mail Response?
Old 09-01-2006, 02:37 PM Automated Mail Response?
mb2000inc's Avatar
Super Talker

Posts: 140
Name: Mark
Location: Ohio
Trades: 0
I'm using a code on a site that sends an automated mail message to the business owner after a customer filled out a contact form. (I created it in Visual Studio 2003)

For some reason, the mail never gets sent out. Originally, I thought that I could just use "localhost" as the SMTP server, but I was told it would never work.

I called the Hosting Company to find out the SMTP address and I changed the code.

Here's what the code looks like: (I changed the email address and server address to cover my 4$$)
As you can see I created a private sub, and called it in the next function.

Private Sub Mail()
Dim msg As New Mail.MailMessage
Dim EmailTo As String
Dim MsgBody As String
Dim msgtext As String
Dim SmtpMail As Mail.SmtpMail

EmailTo = "Name@blankemail.com"
msg.To = EmailTo
msgtext = "Customer Name: " & Me.txtName.Text & Chr(13) & "Customer Phone Number: " & Me.txtPhnNum.Text & Chr(13) & "Customer Email: " & Me.txtEmail.Text & Chr(13) & "Best Time To Call: " & Me.txtTimeCall.Text & Chr(13) & "Additional Comments: " & Me.txtComments.Text
MsgBody = "A potential customer has filled out the request for contact page. See information listed below:"

msg.From = "CompanyPicnicCompany.com"
msg.Subject = "Customer Contact Request"
msg.Body = MsgBody & Chr(13) & msgtext
SmtpMail.SmtpServer = "
http://smtp.blankemail.com"
SmtpMail.Send(msg)

End Sub

Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Call Mail()

SendMessage("Thank you for filling out the Information Request Form. Someone will contact you within 24 hours.")
Response.Redirect("HOME.htm")
End Sub

Any suggestions would be greatly appreciated.


mb
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
 
Register now for full access!
Old 09-05-2006, 09:55 AM Re: Automated Mail Response?
mb2000inc's Avatar
Super Talker

Posts: 140
Name: Mark
Location: Ohio
Trades: 0
No one knows the answer to this?
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
Old 09-09-2006, 08:53 PM Re: Automated Mail Response?
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Quote:
SmtpMail.SmtpServer = "http://smtp.blankemail.com"
get rid of the HTTP://

That's a URL, not a host name. The hostname would just be smtp.blankemail.com
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to Automated Mail Response?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31625 seconds with 12 queries