ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 13th, 2004, 09:55 AM
stringman stringman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 50 stringman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 2 m 20 sec
Reputation Power: 5
Form email not working

I have a feedback form and I want the contents of the form fields to be mailed to an email address specified in the ASP code and the address entered by the user in the feedback form. It only seems to work when the email address is from my local domain. It doesn't matter if the email address is entered in the form or if it is part of the ASP code (objMail.To = email@whatever). The form action calls confirmation.asp, which concatenates the form field contents and presents them to the user. Confirmation.asp displays correctly and all form contents are included correctly.

Does anyone have an idea what I am doing wrong? The ASP code from confirmation.asp is below. Thanks in advance for your help.

stringman

<%
DIM strEmail, strName, strPhone, strComments, mail, reply, objMail, strMessage
strEmail = request.form("eMail")
strName = request.form("name")
strPhone= request.form("phone")
strComments = request.form("comments")
strComments = Replace(strComments, Chr(13), "<br />")

mail = ("stringerk@saic.com")
reply = request.form("eMail")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = reply
objMail.Subject = "User Feedback from OSIS"
objMail.To = mail
objMail.cc = strEmail

objMail.BodyFormat=0
objMail.MailFormat=0

strMessage = "// UNCLASSIFIED //<br /><br />"
strMessage = strMessage & "<b>Name: </b>" & strName & "<br />"
strMessage = strMessage & "<b>Email: </b>" & strEmail & "<br />"
strMessage = strMessage & "<b>Phone: </b>" & strPhone & "<br />"
strMessage = strMessage & "<b>Comments: </b>" & strComments & "<br /><br />"
strMessage = strMessage & "// UNCLASSIFIED //"

objMail.Body = strMessage

objMail.Send
Set objMail = nothing

Response.Write strMessage
%>

Reply With Quote
  #2  
Old February 13th, 2004, 03:21 PM
phudgee phudgee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 10 phudgee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 40 sec
Reputation Power: 0
Just a guess, but your mail server probably thinks someone is trying to relay mail through your server.

Check your mailserver and make sure it is set to relay mail in BOTH of the following cases:

- The recipient is a local user
- The destination is a local user

Just a guess.... but that's what it sounds like to me.

Reply With Quote
  #3  
Old February 13th, 2004, 05:05 PM
stringman stringman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 50 stringman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 2 m 20 sec
Reputation Power: 5
Thanks. I don't have control over our mail server or the clients', but I'm learning the right questions to ask to get this thing troubleshot.

stringman

Reply With Quote
  #4  
Old February 13th, 2004, 08:07 PM
blues82 blues82 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 97 blues82 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 58 m 5 sec
Reputation Power: 6
Just a thought, but if you are running windows 2000, cdonts is now cdo mail and there is a new format to sending it.

Quote:
Originally Posted by stringman
I have a feedback form and I want the contents of the form fields to be mailed to an email address specified in the ASP code and the address entered by the user in the feedback form. It only seems to work when the email address is from my local domain. It doesn't matter if the email address is entered in the form or if it is part of the ASP code (objMail.To = email@whatever). The form action calls confirmation.asp, which concatenates the form field contents and presents them to the user. Confirmation.asp displays correctly and all form contents are included correctly.

Does anyone have an idea what I am doing wrong? The ASP code from confirmation.asp is below. Thanks in advance for your help.

stringman

<%
DIM strEmail, strName, strPhone, strComments, mail, reply, objMail, strMessage
strEmail = request.form("eMail")
strName = request.form("name")
strPhone= request.form("phone")
strComments = request.form("comments")
strComments = Replace(strComments, Chr(13), "<br />")

mail = ("stringerk@saic.com")
reply = request.form("eMail")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = reply
objMail.Subject = "User Feedback from OSIS"
objMail.To = mail
objMail.cc = strEmail

objMail.BodyFormat=0
objMail.MailFormat=0

strMessage = "// UNCLASSIFIED //<br /><br />"
strMessage = strMessage & "<b>Name: </b>" & strName & "<br />"
strMessage = strMessage & "<b>Email: </b>" & strEmail & "<br />"
strMessage = strMessage & "<b>Phone: </b>" & strPhone & "<br />"
strMessage = strMessage & "<b>Comments: </b>" & strComments & "<br /><br />"
strMessage = strMessage & "// UNCLASSIFIED //"

objMail.Body = strMessage

objMail.Send
Set objMail = nothing

Response.Write strMessage
%>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Form email not working


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT