View Full Version : Form email worked, now doesn't
furin121
11-08-2004, 04:29 AM
I just setup my account today and have posted parts of my site. One of my pages is a "contact" page that uses a form to send feedback to mevia email. When I first posted the code, it worked fine. About an hour later and it no longer works. Nothing in the code changed. I have verified that I can send / receive mail from the email accounts that the form uses so I don't know what could be causing the problems. Any suggestions? Like I said, this worked to start with but for some reason no longer functions.
Here's the code that does the work on the form(located in a code behind file):
Private Sub sendForm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dimformmail As New MailMessage
formmail.To = "using my correct email addy here"
formmail.From ="I created an email user just for form submissions, I use it here"
formmail.BodyFormat = MailFormat.Text
formmail.Priority = MailPriority.Normal
formmail.Subject = txtSubject.Text
formmail.Body = "Time sent: " + DateTime.Now + vbCrLf & _
"Sent by: " & txtName.Text & vbCrLf & vbCrLf & _
"---------------------------------------" & vbCrLf & _
txtMessage.Text
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(formmail)
End Sub
bruce
11-08-2004, 09:44 AM
what do you mean by the code no longer works? do you get an error?
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
furin121
11-08-2004, 09:48 AM
I don't get any errors but I no longer get emails from the form like I did to start. I submitted this to technical support and someone there is trying to assist with the problem but so far we have not found a resolution. They could not find a problem with the code and a test script they created works. Not sure why mine stopped working all of the sudden.
I tried setting up a form mail and received the following error.
The server rejected one or more recipient addresses. The server response was: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
Any information on this would be very helpful.
furin121
11-09-2004, 04:10 AM
Bryan, post code please. I have received that error before. One of your addresses is incorrect. If you post the code I can probably tell you which one.
bluebeard96
11-09-2004, 05:33 AM
Are you changing your form data when submitting? If the messages are identical, your ISP/mail server may be blocking the incoming messages because they are perceived as duplicates/spam.
Mike Reilly, Secretary/Webmaster
Kiwanis Club of Rancho Penasquitos
"Serving the Children of the World"
Mike@KiwanisPQ.org
(760) 419-7429
Nevermind, I found out how to fix this. Thanks
bruce
11-09-2004, 08:41 AM
the application is probably using SMTP host other than localhost.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
Tom S
11-10-2004, 09:41 AM
I am having a similar problem.
Email worked before and now it doesn't.
Using the following:
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mailMsg);
I get the following error: Could not access 'CDO.Message' object.
Any ideas?
Tom S
jamesr
11-11-2004, 06:46 AM
I am having a similar problem although I have not been able to get ANY data forwarded to me via email after pressing submit. I fill out the form (tried using different form data as suggested to prevent possible spam blockage) and press the submit button then get my response html, but no email is ever sent. Idont recieve any error message. It seems as though it works, but no data is sent.
I sent a support question via support ticket and was advised to change smtp to "localhost", but that unfortunately did not seem to help. Still no data. Would really appreciate if anyone can help me get this going. Thanx in advance.
this is the portion of code I am using to do the actual sending:
'Send email (CDOSYS version).
if mailComp = "CDOSYS" then
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
cdoMessage.From = fromAddr
cdoMessage.ReplyTo = replyTo
cdoMessage.To = recipients
cdoMessage.Subject = subject
cdoMessage.HtmlBody = body
on error resume next
cdoMessage.Send
if Err.Number <> 0 then
SendMail = "Email send failed: " & Err.Description & "."
end if
set cdoMessage = Nothing
set cdoConfig = Nothing
exit function
end if
aimlion11
11-11-2004, 11:06 AM
We too are having problems with sending email. Our forms post to a script that read the To, From, Subject, and Body variables using Request.Form. Inside the mail routine, we print out the variables that have been passed to it, and they are there, but we always receive a time out error or a<!--StartFragment --> [10053] Software caused connection abort
error.
If we use literal strings instead of the variables gathered from the form, everything works. If we set the variables to a literal string within the script page, everything works, but if we set the variables using request.form, the variable have the correct value, but nothing works.
Been stuck on this for days, and I swear everything use to work.
We have a live site hosted someplace else, and it works there. I have a couple of sites, and it works there.
Any ideas??? Client want to move to DiscountASP, but is having second thoughts.
Any help appreciated.
--Rob
Scott
11-11-2004, 11:13 AM
Are you using any of the Advanced Intellect components (i.e.,aspNetMime,aspNetPop3.aspNetEMail, aspNetMX) in your email routines? The recent upgrades may have caused some anomolies.
jamesr
11-11-2004, 11:17 AM
I am using none of the advancedcomponents. Just using CDOSYS. Still having no luck w/ this.
Tom S
11-12-2004, 12:07 PM
My problem has been resolved.
I was told that the SMPT server was overburdened by another user causing the failure.
I am using the System.Web.SmtpMail class.
vBulletin® ©Jelsoft Enterprises Ltd.