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.

ASP.NET Forum


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



Reply
Old 02-25-2006, 11:30 AM ASP form mailer
Junior Talker

Posts: 2
Trades: 0
Hi,
I am a beginner in all this, please help!!. I am setting up my form- mailer using Godaddy gdform.asp to send email to my email account when users submit their info. Everything works great except that I get the email with everything in an alphabetically order....Is there a way to disable this action? I really want to get the email the way the form was set up!! Thank you for your input!!

this is the not from Godaddy help page!
NOTE: Keep in mind that our form-mailer script will sort the names of your form items alphabetically when it composes the email message. This is the order of precedence: uppercase letters, lowercase letters, numbers.
shawny_74 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-25-2006, 05:29 PM Re: ASP form mailer
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Yes, I have a few clients with their site hosted on GoDaddy. The best thing to do is get another form mail script (asp) and use that. Their script isn't the best.

Just make sure that when you use your own script to go into your control panel at GoDaddy and remove your email address from the Form-Mailer Setup section..

--

Hey shawny_74, I have been meaning to do this for a while now. I have built a form mail with asp that hopefully is friendly for the non-asp coder.

You can grab the code here: www.chipjohns.com/download/aspformmail.htm if you have any questions regarding this just post here..

Last edited by ChipJohns; 02-25-2006 at 06:41 PM..
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 05-26-2006, 04:01 AM Re: ASP form mailer
Junior Talker

Posts: 3
Trades: 0
Thank you for your example form code. I too am a beginner and use Godaddy.com. I moved your code into MSFrontpage 2000. I modified both documents to suite my needs. I removed my email address from the form mailer in GoDaddy tools.

When I tested it, the form came up, I was able to fill it in, and press submit. It said that it was sent on the response page but nothing came to my email address.

Can you point me in the right direction on how to troubleshoot this problem.

Thanks,
Sarah
sarmar99 is offline
Reply With Quote
View Public Profile
 
Old 05-26-2006, 04:56 AM Re: ASP form mailer
Junior Talker

Posts: 3
Trades: 0
ChipJohns:
I noticed in the directions in the attachment"Contact.asp" : "This asp mail script is designed for IIS Server that requires CDONTS.

Does the following mean that GoDaddy is incompatible with "CDONTS"?
Will the code they suggested help with email not being sent. (posted above)

This is what GoDaddy had to say about CDONTS:

CDOSYS is part of the System.Web.Mail namespace and is installed by default on Windows 2000 and Windows XP platforms. It replaces CDONTS for the sending of SMTP email messages and can be used with our Windows hosting accounts. The following code sample demonstrates how CDOSYS is used to create, format, and send email.
NOTE: The server "relay-hosting.secureserver.net" is used to send email from your hosted domain. You must populate the SmtpMail object's SmtpServer property with this value.
// language -- C#
// import namespace
using System.Web.Mail;

private void SendEmail()
{
const string SERVER = "relay-hosting.secureserver.net";
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "emailaddress@domainname";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources
}
For more information about CDOSYS, see MSDN."
sarmar99 is offline
Reply With Quote
View Public Profile
 
Old 05-26-2006, 09:13 AM Re: ASP form mailer
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hi Sarah, Did you add your email address to the contactressponse.asp page?

'use the email address that you desire the message to be sent to..
objMyMail1.To = "your.email.address@whatever.com"

As far as the CDONTS vs CDOSYS. I'm running this script succesfully on a couple of Gddy accounts.

All I can say is it is because of inconsistencies like this that I having all of my clients move from Gddy to another host. They do things like this and do not offer any support whatsoever. They say it is our responsibility to make things work, but, refuse to offer any suggestions as to what direction to turn.

I know its tough to do this when your site isn't a business/profit maker. They do offer a nice price.

Any way, if you can't get the code to work, repost here. I am not a strong asp programmer, so if I can't help you, others will be able to. There are a couple of gurus here.
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 05-26-2006, 01:44 PM Re: ASP form mailer
Junior Talker

Posts: 3
Trades: 0
Something wrong happened when I made my modifications. I scrapped my version and posted your original. It worked fine then. I need to be more careful with my modifications.

With the version that didn't work, I did all my editing in Frontpage 2000. I wonder if Frontpage did something to it.

My next step is to test that theory. I would really like to encorporate your script into my frontpage design, but that may not be possible.

I really appreciated the simple process in your code. Of all the research I've done, yours was by far the easiest to understand for a newbe like me.

Thanks
sarmar99 is offline
Reply With Quote
View Public Profile
 
Old 05-29-2006, 03:40 AM Re: ASP form mailer
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Thanks Sara,

probably the reason for its ease is a secret... I am a newbie too. I'm just a few steps ahead of you, but not much. I got frustrated looking at all of the scripts that are great for gurus, so I decided to post what I was using... Thanks, I apprciate the comments. And may I encourage you to keep learning asp, so that I will have one more person to ask questions..!

See ya around the halls, or at the water fountain.
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 08-23-2006, 10:24 PM Re: ASP form mailer
Junior Talker

Posts: 1
Name: Chris
Trades: 0
Hey ChipJohns,
thanks for posting this sample asp for godaddy.com. I have created 2 asp versions of this sample code and it works great.
Now, the question I have is if you know the correct coding for multiple recipient email address.

{'use the email address that you desire the message to be sent to..

objMyMail1.To = "sales@gmail.com"}


I need this to go to 2 different email address.

I have tried this but it didn't work

objMyMail1.To = "sales@gmail.com"
objMyMail1.To = "support@gmail.com"

any help would be appreciated,
Cheers,
Chris
watsonink is offline
Reply With Quote
View Public Profile
 
Old 08-24-2006, 08:32 AM Re: ASP form mailer
saadatshah's Avatar
Extreme Talker

Posts: 215
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Trades: 0
try , separated list
__________________
- -- --- ---- ----- ------ ------- ---------------
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Old 08-24-2006, 09:29 AM Re: ASP form mailer
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
hi watsonink,

try this. Should work!

Code:
 objMyMail1.To = "email1@domain.com; email2@domain.com"
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 08-25-2006, 08:43 AM Re: ASP form mailer
saadatshah's Avatar
Extreme Talker

Posts: 215
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Trades: 0
Did it work for you?
__________________
- -- --- ---- ----- ------ ------- ---------------
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Old 09-19-2006, 12:21 AM Re: ASP form mailer
Junior Talker

Posts: 1
Name: Floyd Benson
Trades: 0
I use GoDaddy as well and was having the same problem getting a very simple form to work...tried many different scripts and solutions then finally found something that worked, for me anyway.

The script and VERY simple and clear instructions were found at:

http://www.brainjar.com/asp/formmail/default.asp


This is what the HTML on my page looks like:

<form action="spform.asp" method="post">
<input name="_recipients" type="hidden" value="contact@mysite.com" />
<input name="_subject" type="hidden" value="Contact From Website" />
<input name="_redirect" type="hidden" value="thank_you.html" />
<input name="_requiredFields" type="hidden" value="Name,Email,Comments" />
<input name="_replyTo" type="hidden" value="submissions@mysite.com" />
<input name="_fieldOrder" type="hidden" value="Name,Email,Comments" />
<p><center><table width="50%" border="0" cellpadding="5">
<tr style="vertical-align: top">
<td><p align="left"><a href="<A href="mailto:contact@street-people.com"><img">mailto:contact@street-people.com"><img src="http://www.street-people.com/images/mailbox.jpg" alt="Contact Us" width="150" height="225" border="0"></a></p></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><p align="left"><label for="name"> Name:<br />
</label>
<input type="text" id="name" name="Name" size="45" /></p>
<p align="left"><label for="email"> E-mail:<br />
</label>
<input type="text" id="email" name="Email" size="45" /></p>
<p align="left"><label for="comments"> Questions or Comments:<br />
</label>
<textarea id="comments" name="Comments" rows="10" cols="40"></textarea></p>
<p>
<input type="submit" value="Submit" />
<input type="reset" value="Clear" />
</p></td>
</tr>
</table>
</center>
</p>
</form>



Disregard all the table stuff.

And here's what my script looked like:



<%@ LANGUAGE="VBScript" %>
<% '************************************************* **************************
'* ASP FormMail *
'* *
'* Do not remove this notice. *
'* *
'* Copyright 1999-2002 by Mike Hall. *
'* Please see http://www.brainjar.com for documentation and terms of use. *
'************************************************* **************************
'- Customization of these values is required, see documentation. -----------
referers = Array("www.mysite.com", "mysite.com")
mailComp = "CDONTS"
smtpServer = "name.server.net"
fromAddr = "submissions@mysite.com"
'- End required customization section. -------------------------------------
Response.Buffer = true
errorMsgs = Array()
'Check for form data.
if Request.ServerVariables("Content_Length") = 0 then
call AddErrorMsg("No form data submitted.")
end if
'Check if referer is allowed.
if UBound(referers) >= 0 then
validReferer = false
referer = GetHost(Request.ServerVariables("HTTP_REFERER"))
for each host in referers
if host = referer then
validReferer = true
end if
next
if not validReferer then
if referer = "" then
call AddErrorMsg("No referer.")
else
call AddErrorMsg("Invalid referer: '" & referer & "'.")
end if
end if
end if
'Check for the recipients field.
if Request.Form("_recipients") = "" then
call AddErrorMsg("Missing email recipient.")
end if
'Check all recipient email addresses.
recipients = Split(Request.Form("_recipients"), ",")
for each name in recipients
name = Trim(name)
if not IsValidEmailAddress(name) then
call AddErrorMsg("Invalid email address in recipient list: " & name & ".")
end if
next
recipients = Join(recipients, ",")
'Get replyTo email address from specified field, if given, and check it.
name = Trim(Request.Form("_replyToField"))
if name <> "" then
replyTo = Request.Form(name)
else
replyTo = Request.Form("_replyTo")
end if
if replyTo <> "" then
if not IsValidEmailAddress(replyTo) then
call AddErrorMsg("Invalid email address in reply-to field: " & replyTo & ".")
end if
end if
'Get subject text.
subject = Request.Form("_subject")
'If required fields are specified, check for them.
if Request.Form("_requiredFields") <> "" then
required = Split(Request.Form("_requiredFields"), ",")
for each name in required
name = Trim(name)
if Left(name, 1) <> "_" and Request.Form(name) = "" then
call AddErrorMsg("Missing value for " & name)
end if
next
end if
'If a field order was given, use it. Otherwise use the order the fields were
'received in.
str = ""
if Request.Form("_fieldOrder") <> "" then
fieldOrder = Split(Request.Form("_fieldOrder"), ",")
for each name in fieldOrder
if str <> "" then
str = str & ","
end if
str = str & Trim(name)
next
fieldOrder = Split(str, ",")
else
fieldOrder = FormFieldList()
end if
'If there were no errors, build the email note and send it.
if UBound(errorMsgs) < 0 then
'Build table of form fields and values.
body = "<table border=""0"" cellpadding=""2"" cellspacing=""0"">" & vbCrLf
for each name in fieldOrder
body = body _
& "<tr valign=""top"">" _
& "<td><b>" & name & ":</b></td>" _
& "<td>" & Request.Form(name) & "</td>" _
& "</tr>" & vbCrLf
next
body = body & "</table>" & vbCrLf
'Add a table for any requested environmental variables.
if Request.Form("_envars") <> "" then
body = body _
& "<p>&nbsp;</p>" & vbCrLf _
& "<table border=""0"" cellpadding=""2"" cellspacing=""0"">" & vbCrLf
envars = Split(Request.Form("_envars"), ",")
for each name in envars
name = Trim(name)
body = body _
& "<tr valign=""top"">" _
& "<td><b>" & name & ":</b></td>" _
& "<td>" & Request.ServerVariables(name) & "</td>" _
& "</tr>" & vbCrLf
next
body = body & "</table>" & vbCrLf
end if
'Send it.
str = SendMail()
if str <> "" then
AddErrorMsg(str)
end if
'Redirect if a URL was given.
if Request.Form("_redirect") <> "" then
Response.Redirect(Request.Form("_redirect"))
end if
end if %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Form Mail</title>
<style type="text/css">
body {
background-color: #ffffff;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
}
table {
border: solid 1px #000000;
border-collapse: collapse;
}
td, th {
border: solid 1px #000000;
border-collapse: collapse;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
padding: 2px;
padding-left: 8px;
padding-right: 8px;
}
th {
background-color: #c0c0c0;
}
.error {
color: #c00000;
}
</style>
</head>
<body>
<% if UBound(errorMsgs) >= 0 then %>
<p class="error">Form could not be processed due to the following errors:</p>
<ul>
<% for each msg in errorMsgs %>
<li class="error"><% = msg %></li>
<% next %>
</ul>
<% else %>
<table cellpadding="0" cellspacing="0">
<tr>
<th colspan="2" valign="bottom">
Thank you, the following information has been sent:
</th>
</tr>
<% for each name in fieldOrder %>
<tr valign="top">
<td><b><% = name %></b></td>
<td><% = Request.Form(name) %></td>
</tr>
<% next %>
</table>
<% end if %>
</body>
</html>
<% '---------------------------------------------------------------------------
' Subroutines and functions.
'---------------------------------------------------------------------------
sub AddErrorMsg(msg)
dim n
'Add an error message to the list.
n = UBound(errorMsgs)
Redim Preserve errorMsgs(n + 1)
errorMsgs(n + 1) = msg
end sub
function GetHost(url)
dim i, s
GetHost = ""
'Strip down to host or IP address and port number, if any.
if Left(url, 7) = "http://" then
s = Mid(url, 8)
elseif Left(url, 8) = "https://" then
s = Mid(url, 9)
end if
i = InStr(s, "/")
if i > 1 then
s = Mid(s, 1, i - 1)
end if
getHost = s
end function
'Define the global list of valid TLDs.
dim validTlds
function IsValidEmailAddress(emailAddr)
dim i, localPart, domain, charCode, subdomain, subdomains, tld
'Check for valid syntax in an email address.
IsValidEmailAddress = true
'Parse out the local part and the domain.
i = InStrRev(emailAddr, "@")
if i <= 1 then
IsValidEmailAddress = false
exit function
end if
localPart = Left(emailAddr, i - 1)
domain = Mid(emailAddr, i + 1)
if Len(localPart) < 1 or Len(domain) < 3 then
IsValidEmailAddress = false
exit function
end if
'Check for invalid characters in the local part.
for i = 1 to Len(localPart)
charCode = Asc(Mid(localPart, i, 1))
if charCode < 32 or charCode >= 127 then
IsValidEmailAddress = false
exit function
end if
next
'Check for invalid characters in the domain.
domain = LCase(domain)
for i = 1 to Len(domain)
charCode = Asc(Mid(domain, i, 1))
if not ((charCode >= 97 and charCode <= 122) or (charCode >= 48 and charCode <= 57) or charCode = 45 or charCode = 46) then
IsValidEmailAddress = false
exit function
end if
next
'Check each subdomain.
subdomains = Split(domain, ".")
for each subdomain in subdomains
if Len(subdomain) < 1 then
IsValidEmailAddress = false
exit function
end if
next
'Last subdomain should be a TDL.
tld = subdomains(UBound(subdomains))
if not IsArray(validTlds) then
call SetValidTlds()
end if
for i = LBound(validTlds) to UBound(validTlds)
if tld = validTlds(i) then
exit function
end if
next
IsValidEmailAddress = false
end function
sub setValidTlds()
'Load the global list of valid TLDs.
validTlds = Array("aero", "biz", "com", "coop", "edu", "gov", "info", "int", "mil", "museum", "name", "net", "org", "pro", _
"ac", "ad", "ae", "af", "ag", "ai", "al", "am", "an", "ao", "aq", "ar", "as", "at", "au", "aw", "az", _
"ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", "bw", "by", "bz", _
"ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr", "cu", "cv", "cx", "cy", "cz", _
"de", "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "eh", "er", "es", "et", _
"fi", "fj", "fk", "fm", "fo", "fr", _
"ga", "gd", "ge", "gf", "gg", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", _
"hk", "hm", "hn", "hr", "ht", "hu", _
"id", "ie", "il", "im", "in", "io", "iq", "ir", "is", "it", _
"je", "jm", "jo", "jp", _
"ke", "kg", "kh", "ki", "km", "kn", "kp", "kr", "kw", "ky", "kz", _
"la", "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", _
"ma", "mc", "md", "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw ", "mx", "my", "mz", _
"na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", _
"om", _
"pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", _
"qa", _
"re", "ro", "ru", "rw", _
"sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", "sn", "so", "sr", "st", "sv", "sy", "sz", _
"tc", "td", "tf", "tg", "th", "tj", "tk", "tm", "tn", "to", "tp", "tr", "tt", "tv", "tw", "tz", _
"ua", "ug", "uk", "um", "us", "uy", "uz", _
"va", "vc", "ve", "vg", "vi", "vn", "vu", _
"wf", "ws", _
"ye", "yt", "yu", _
"za", "zm", "zw")
end sub
function FormFieldList()
dim str, i, name
'Build an array of form field names ordered as they were received.
str = ""
for i = 1 to Request.Form.Count
for each name in Request.Form
if Left(name, 1) <> "_" and Request.Form(name) is Request.Form(i) then
if str <> "" then
str = str & ","
end if
str = str & name
exit for
end if
next
next
FormFieldList = Split(str, ",")
end function
function SendMail()
dim mailObj, cdoMessage, cdoConfig
dim addrList
'Send email based on mail component. Uses global variables for parameters
'because there are so many.
SendMail = ""
'Send email (CDONTS version). Note: CDONTS has no error checking.
if mailComp = "CDONTS" then
set mailObj = Server.CreateObject("CDONTS.NewMail")
mailObj.BodyFormat = 0
mailObj.MailFormat = 0
mailObj.From = fromAddr
mailObj.Value("Reply-To") = replyTo
mailObj.To = recipients
mailObj.Subject = subject
mailObj.Body = body
mailObj.Send
set mailObj = Nothing
exit function
end if
'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/con...tion/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/con...ion/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
'Send email (JMail version).
if mailComp = "JMail" then
set mailObj = Server.CreateObject("JMail.SMTPMail")
mailObj.Silent = true
mailObj.ServerAddress = smtpServer
mailObj.Sender = fromAddr
mailObj.ReplyTo = replyTo
mailObj.Subject = subject
addrList = Split(recipients, ",")
for each addr in addrList
mailObj.AddRecipient Trim(addr)
next
mailObj.ContentType = "text/html"
mailObj.Body = body
if not mailObj.Execute then
SendMail = "Email send failed: " & mailObj.ErrorMessage & "."
end if
exit function
end if
'Send email (ASPMail version).
if mailComp = "ASPMail" then
set mailObj = Server.CreateObject("SMTPsvg.Mailer")
mailObj.RemoteHost = smtpServer
mailObj.FromAddress = fromAddr
mailObj.ReplyTo = replyTo
for each addr in Split(recipients, ",")
mailObj.AddRecipient "", Trim(addr)
next
mailObj.Subject = subject
mailObj.ContentType = "text/html"
mailObj.BodyText = body
if not mailObj.SendMail then
SendMail = "Email send failed: " & mailObj.Response & "."
end if
exit function
end if
end function %>


I'm not a programmer and don't know jack about ASP, but I can follow directions and usually figure things out...as I said, this was VERY simple and easy to follow and it worked for me. Hope it can work for someone else with a similar problem.

You can see the actual page with the form here: http://www.street-people.com/pages/contact.html

Last edited by thefloyd; 09-19-2006 at 12:25 AM..
thefloyd is offline
Reply With Quote
View Public Profile
 
Old 09-26-2006, 03:54 AM Re: ASP form mailer
Junior Talker

Posts: 1
Name: shabith
Trades: 0
Hi Guys!

O.K first thanks for shawny_74 to make this threads.
And I hv download the script from

http://www.brainjar.com/asp/formmail/default.asp

And it's check the validation but after we submit the feedback form we see a "The page cannot be displayed" page and I think it's because the server did not support the CDNOTS or other technologies. I hv send them a email asking them what type of emai tech. they are using. But still they didn't reply me.


So pls guys HELP ME!

If you want to see a page that i have created. It's here
http://www.eyezonecreations.com/contact.asp

Thanks!



</H1>

Last edited by shabith; 10-23-2007 at 12:43 PM.. Reason: as super moderator request
shabith is offline
Reply With Quote
View Public Profile
 
Old 09-27-2006, 04:22 AM Re: ASP form mailer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
yep your site is running on IIS 6.0 so is Windows Server 2003 which doesn't support CDONTS

BTW this forum does not allow HTML in posts, so please edit your post to remove the superfluous code.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-27-2006, 08:30 AM Re: ASP form mailer
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Shabith,

Try This Post

Hopefully will hep
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 04-10-2007, 07:13 PM Re: ASP form mailer
Junior Talker

Posts: 1
Trades: 0
Alright, I have a similar problem with godaddy. I am working on a site which uses a CDO.message for the administrator to answer an asked question as well as give the option to post it to a FAQs page. When she answers a question, an email is supposed to be sent back the person who asked the question. On the old site, it worked fine, but now we are in the process of transitioning over to godaddy and no email is recieved on that side. The file structure was mirrored over to the godaddy server, so I know that there is no way some code was changed. The tech support people there are worthless, and after spending over an hour on the phone to result to nothing, I have thrown up my hands with them. Here is the code from the page:

If request.form("post") = "yes" Then
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open connectionstring
Set rsAddComments = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM tblfaq"
rsAddComments.CursorType = 2
rsAddComments.LockType = 3
rsAddComments.Open strSQL, adoCon
rsAddComments.addnew
rsAddComments.Fields("subject")=strformat(request. form("subject"))
rsAddComments.Fields("question")=strformat(request .form("question"))
rsAddComments.Fields("answer")=strformat(request.f orm("answer"))
rsAddComments.Update
rsAddComments.Close

Set myMail=CreateObject("CDO.Message")
myMail.Subject=strformat(request.form("question"))
myMail.From="DidiLorillard@aol.com" myMail.To=request.form("email")
myMail.TextBody=strformat(request.form("answer"))
myMail.Send
set myMail=nothing
end if

Anyone have any ideas?
Thanks in advance.
matt555 is offline
Reply With Quote
View Public Profile
 
Old 04-12-2007, 02:59 AM Re: ASP form mailer
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Your first mistake was in expecting hosting techs to offer support on scripts. Almost no hosts do that (scripts are the designer's problem; they just make sure the servers work). That's not GoDaddy's fault.

As far as any ideas, that would depend on a few things:

Does GoDaddy support CDO? (I suspect they do, but some hosts don't.)
Are you getting any error messages?
Where is your strformat function in all of this? (That's abviously a custom format.)
What happens if you change the aol.com email address to a different one (e.g. a hotmail one, one associated with your domain name) and send the email there? It could be getting trapped in a junk filter.

If it's not one of these four things, I wouldn't have a clue what to suggest.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 08-13-2007, 06:36 AM Re: ASP form mailer
Junior Talker

Posts: 1
Name: jem
Trades: 0
Hi evryone...

I was able to download this script courtesy of chipjons.

Im just want to ask help from you..
I want to put a "thank you" link window once the form will be submit and an error window if the form was incompletely filled up.

I am just new to this.. so i need help from you guys..

thank uou so much

here's the script... i have removed other line which i dont need.

<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBS CRIPT" CODEPAGE="1252"%>
<%
Option Explicit
Response.Expires = 0

'you need to set up a variable (declare variables) for each filed fron your form page
' what I like to do is use the exact same name and add str for string to the beginning of it.
Dim strName
Dim strEmail
Dim strComments
' After you declare the variables you need to assign a value to each one.
' each variable will be assign the corresponding value being sent from the form
'If you need other form fields, declare them above and assign a value here, Just
'follow the same format.
strName = Trim(Request.Form("name"))
strEmail = Trim(Request.Form("email"))
strComments = Trim(Request.Form("comments"))

'this section sends the information to your email in an html format
Dim objMyMail1, msgBody, msgSubject
Set objMymail1 = Server.CreateObject("CDONTS.NewMail")
Dim strResponse
'Replace Response from my site with the text that you want to be read in the subject line in the emai that you recieve.
'DO NOT REMOVE THE QUOTES
strResponse = "Response from my site"
msgSubject = strResponse
'this creates and prepares the html formatted email
msgBody ="<html>"
msgBody = msgBody & "<head>"
msgBody = msgBody & "<title>Site Response</title>"
msgBody = msgBody & "<style type='text/css'>"
msgBody = msgBody & "<!--"
msgBody = msgBody & "p { font-family: Arial, Helvetica, sans-serif; font-size: 75%; color: #333333;}"
msgBody = msgBody & "-->"
msgBody = msgBody & "</style>"
msgBody = msgBody & "</head>"
msgBody = msgBody & "<body>"
msgBody = msgBody & "<p>This is a respnose My Contact page</p>"
'Name
msgBody = msgBody & "<p>Name: "
msgBody = msgBody & strName
msgBody = msgBody & "</p>"
'Email
msgBody = msgBody & "<p>Email: "
msgBody = msgBody & strEmail
msgBody = msgBody & "</p>"
'Comments
msgBody = msgBody & "<p>Comments:<br>"
msgBody = msgBody & strComments
msgBody = msgBody & "</p>"

msgBody = msgBody & "</body></html>"
'End of html format

objMyMail1.From = strEmail

'use the email address that you desire the message to be sent to..
objMyMail1.To = "myem@il.com"

objMyMail1.Subject = msgSubject
objMyMail1.BodyFormat = 0
objMymail1.MailFormat = 0
objMyMail1.Body = msgBody
objMyMail1.Send
Set objMyMail1 = Nothing
%>
<!--
Everything above this poont will go above the head tag in your file
remember that this file should be named with an asp extension. -- contactresponse.asp
-->
redbutller2003 is offline
Reply With Quote
View Public Profile
 
Old 08-21-2007, 04:37 PM Re: ASP form mailer
Junior Talker

Posts: 1
Name: John Ellis
Trades: 0
I too downloaded ChipJohns contactresponse.asp form mailer. I published it to my GoDaddy web site host and get the below listed error everytime I trigger it with the Submit button in my Web page. I never could get the GoDaddy gdform.asp form mailer to work. Can anyone tell me what this error means and how I can get the contactresponse.asp form mailer working??
-----


Active Server Pageserror 'ASP 0245'
Mixed usage of Code Page values
/contactresponse.asp, line 1 The @CODEPAGE value specified differs from that of the including file's CODEPAGE or the file's saved format. </SPAN>
jellis00 is offline
Reply With Quote
View Public Profile
 
Old 08-22-2007, 08:56 PM Re: ASP form mailer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
delete the

<%@LANGUAGE="VBSCRIPT" CODEPAGE="nnnn"%>

line
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to ASP form mailer
 

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 1.15243 seconds with 12 queries