PDA

View Full Version : Form Mail


wisemx
11-02-2007, 01:44 AM
If you've done all that searching and reading I really hate to give you another link but...
This asp.net formail control has been well received, so you might want to give it a try:
http://www.asp.net/community/control-gallery/Item.aspx?i=1363

busterapoc
11-02-2007, 04:33 AM
First of all Im losing hope on internet bizz. I got my masters in Multimedia internet production and did a lot of websites, but I never learned how to make a contact page where someone could fill it out and it gets sent to my email. I read (not kidding) a 4k page book and did all the steps and followed right along. I have plenty of skill in flash. I received a free index.php mail.php file and used it with my flash to send e-mails. with discountasp.net it does not work. I used the cdont like I learned in the book it does not work. I researched hundreds of websites and did everything I could think of, not even close. So, can anyone please help me make a mail.asp file sendit.asp file so I can receive e-mails on my site? I guess there is a lot of help on these forms, but after reading tons of info if you put into search you get little to no results and anything that is said is way past what Im trying to do it seems.

[quote]<%
Setreg=NewRegExp
reg.Pattern='^[A-Za-z0-9\._\-]+@([A-Za-z0-9\._\-]+\.)+[A-Za-z0-9\._\-]+$'
Setm=reg.Execute(Request.QueryString('your_email') )

ifm.count>0then
smtpServer='swapper.loc'
smtpPort=25

name=Request.QueryString('your_name')
SetmyMail=CreateObject('CDO.Message')
myMail.Subject='from'&name
myMail.From=Request.QueryString('your_email')
myMail.To=Request.QueryString('recipient')
myMail.HTMLBody='<html><head><title>Contactletter</title></head>[b]
'&Request.QueryString('message')&'</body></html>'
myMail.Configuration.Fields.Item('http://schemas.microsoft.com/cdo/configuration/sendusing')=2
myMail.Configuration.Fields.Item('http://schemas.microsoft.com/cdo/configuration/smtpserver')=smtpServer
myMail.Configuration.Fields.Item('http://schemas.microsoft.com/cdo/configuration/smtpserverport')=smtpPort
myMail.Configuration.Fields.Update
myMail.Send
Response.Write('Youremailwassent')
else
Response.Write('Invalidemail')
Endif

%>
<script>
resizeTo(300,300)
//window.close()
</script></CODE>

I always get cant connect to server. I dont know where to begin. Ive done so many templates and followed instructions out of books and from other people, but nothing has ever came close to working. I have got things to work with other hostings just not discountasp.net. So this is my last attempt on the internet before I decide to toss the internet buss in the trash and just get a job working at a call center or worse....

sunny_popali
12-05-2007, 07:20 AM
IF you prefer writing code in aspx code behind file you can chek one of my post :

http://forums.asp.net/p/1186909/2041809.aspx#

-Good Luck ,

Regards,
Sunny