Forum Moderators: coopster

Message Too Old, No Replies

php email form w/ smtp authentication

Need help creating or finding an email form that supports authentication

         

quantikev

2:15 am on Jul 27, 2009 (gmt 0)

10+ Year Member



I am currently implementing a simple form on a website which asks for a visitor's name, email, and phone. This script them emails the results to me.

However, my host requires authentication to send email, anonymous is disabled.

I do not know PHP, but they said I could use phpmailer to create such a script.

Can anyone help me create the php file necessary to collect info from 3 text inputs and mail it out using name and password smtp authentication?

Or direct me to such an existing script (preferably free, but will purchase).

Thank you very much,
Kevin

dreamcatcher

6:55 am on Jul 27, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Kevin,

You`ve already mentioned the system you need. PHPMailer. Google for that and download. You`ll find examples on the mailer site, which should help you.

dc

quantikev

3:44 pm on Jul 27, 2009 (gmt 0)

10+ Year Member



Hello again dc,

I checked their main site and found examples, unfortunately I can't find anything which has variables for a form 'and' smtp authentication. Nor in Google searches.

Unfortunately I don't know PHP. You wouldn't happen to know where I can find such an example, or even perhaps someone here at the forums who could write one?

Thanks again,
Kevin

quantikev

4:14 pm on Jul 27, 2009 (gmt 0)

10+ Year Member



Ok this is probably the example I would use: [phpmailer.worxware.com...]

Then I need to somehow incorporate the form contents into the message.

I see a $body variable, which is currently assigned file_get_contents('contents.html');

I assume somehow I have to replace that with the form contents? If so, my question is how?

Thanks a lot!