Jump to content

PHP mail script with authentication


Brad7928

Recommended Posts

php mail() does not support SMTP authentication,

So you could try PEAR Mail or Use a socket connection.. if this sounds like too much hard work.. then

get a copy of phpmailer and that will do it all for you including HTML email and attachments.

 

Hope that Helps

I know php mail() doesn't support AUTH LOGIN.

 

I've tried this, but didn't work...

 

http://www.codewalkers.com/c/a/Email-Code/Smtp-Auth-Email-Script/

 

I am using xampp on a windows box with php 5 and mySQL.

 

1. Where would i get PEAR mail from? (found one at pear.php.net but it's for 'nix systems)

 

2. How would i install it/intergrate it into my form?

the one at pear.php.net isn't just for *nix.. just install but your need to install PEAR as well..

if the example in the link supplied "doesn't work" then phpmailer probably won't work either, your need to check sockets are installed, check your phpinfo();

 

PS: saying "doesn't work" and giving no other info is kinda usless to anyone try to help. it would be like me saying "yes it does!"

Ok, so what i meant by doesn't work is:

 

I fill in the form, the php script grabs the info it needs from the form, but doesn't send it to the mail server, yet i get redirected to the success page.

 

At the moment i am trying out phpmailer. I'll keep you posted.

Trying to get the setting right for PHPmailer. it's told me that:

 

To be fully functional, include:

phpmailer-fe.php
class.phpmailer.php

in the _lib/ directory and set the basic settings.

Strategies employed in this sample form:

* phpmailer-fe.php is in the _lib/ directory
* class.phpmailer.php is in the _lib/ directory 
  - means phpmailer-fe.php will use class.phpmailer.php to handle the sending of data

 

But i look in the /lib file, and there is no file called class.phpmailer.php

 

My phpinfo tells me that socket support is enabled.

 

Any idea's?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.