PDA

View Full Version : I just can't connect a form to email :(



elliot
05-15-2006, 09:16 PM
Hi all,

I'm really hoping to find a solution to something which is now driving me crazy... I'm not a coder, not close, though have been getting help from a friend to try an implement some code to get a form connecting to an email...
how hard can it be? hopefully not to hard

As it stands I've a form with the following two top lines of code



<form action="/scripts/emailMoo.asp" method="post">

<input name="_recipients" type="hidden" value="purpleapplepie@yahoo.com" />


the file emailMoo.asp is replicating the code from http://www.hosting-support.pipex.net/myserverworld/formmail.txt

I've put in the following


referers = Array("bhbgroup.co.uk")
mailComp = "CDOSYS"
smtpServer = "intmail.atlas.pipex.net"
fromAddr = "username_goes_here"

cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "intmail.atlas.pipex.net"
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
'You need to edit the next two lines
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username_goes_here"
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password_goes_here"

I also added to the form the required field of '_recipients' and set it you my email as such:
<input name="_recipients" type="hidden" value="purpleapplepie@yahoo.com" />


though am getting a results http://www.bhbgroup.co.uk/img/Untitled-1.gif

Web Fusion the host say the account has been set up properly and aren't willing to offer any other help :(

I'd really appriciate any thing you can offer

cheers,
elliot

Twey
05-16-2006, 06:33 AM
Your SMTP server should be set to smtp.yahoo.com, methinks.

elliot
05-16-2006, 09:50 AM
Hi Twey, the smtp setting were from the host company I'm using webfusion (http://www.webfusion.co.uk/)

Am I able to use the one you suggested instead, and how come it's a Yahoo smtp? this is all very foreign to me :)

thanks

Twey
05-16-2006, 09:59 AM
Depends on the address you're using. If you're sending from an @yahoo.com address, use smtp.yahoo.com (although I now notice that that address was for the recipient, not the sender).

At any rate, the SMTP server you were attempting to use (intmail.atlas.pipex.net:25) refuses connections, although the host exists. I suggest you ask them to give you a correct SMTP server.

elliot
05-16-2006, 01:59 PM
Thanks Twey, that's helpful to know. I'll contact my host to explain this and see where I get from there.. hopefully all will be resolved

many thanks