PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 29th, 2012, 05:02 AM
BrightIdea BrightIdea is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 31 BrightIdea Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 5 m 21 sec
Reputation Power: 0
Mail and PHP mail function

Hi

I have been working on a PHP contact form where the user enters some basic details and the data is sent off as an email.

So I have made the form and ran it using XAMPP on local host.
The php runs and I have just put the HTML page and the PHP page in Apache-'htdocs' root folder and ran them there for testing.



The question is, when I ran the script I added my own email address as a test and did not receive an email.
So I looked a little at the documentation and some Google results and found that the PHP INI file has to be changed to send mail to your own email on localhost.

I checked the php.ini file and found this:

Quote:
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder

sendmail_path = "C:\xampp\mailtodisk\mailtodisk.exe"


I checked the C:\mailoutput folder and found my emails.

So I assumed the script is working properly and there would be no need for me to send an email to myself.

I have a question regarding the way I should set this up when the time comes to actually deploy the site on someones hosting server,(which would just be some basic business hosting plan).
Not sure but the plan has enough space,php and some email addresses, this is all I have managed to find out so far so I assume it has everything needed to run the contact form.

Do I just use the servers SMTP for the email addresses supplied ? What parts of the php.ini file do I use when the page goes live?


Dan

Reply With Quote
  #2  
Old October 29th, 2012, 07:41 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,880 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 2 Weeks 2 Days 22 h 45 m 55 sec
Reputation Power: 581
It all depends on how your http server is configured. You don't necessarily need to change php.ini to send mail to yourself. The questions you need to answer are:

1) Is your http host also running SMTP?
2) If the answer to 1 is no then are you using a valid SMTP host in your PHP mailer?
3) If the answer to 1 is yes then what do the SMTP logs say about the email being sent by PHP?
4) If the answer to 2 is yes then is that host configured to be a mail relay for your http host?
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.

Reply With Quote
  #3  
Old October 29th, 2012, 08:00 AM
BrightIdea BrightIdea is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 31 BrightIdea Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 5 m 21 sec
Reputation Power: 0
Quote:
Originally Posted by gw1500se

1) Is your http host also running SMTP?

Why wouldnt they be? It is a simple hosting plan that offers free emails as part of the package like most do.
Quote:
2) If the answer to 1 is no then are you using a valid SMTP host in your PHP mailer?

I am not using a host as you can see in the lines above xampp just sends the mail to a folder at present.
Quote:
3) If the answer to 1 is yes then what do the SMTP logs say about the email being sent by PHP?

The page is local at present not on the host server.
Quote:
4) If the answer to 2 is yes then is that host configured to be a mail relay for your http host?


This is what I mean do I simply need a valid SMPT address and port to set this up on the server?

I mean if I added my current SMPT address to the php.ini file (or my clients) then If I uploaded it to a server would it send mail to that person?

Thanks

Reply With Quote
  #4  
Old October 29th, 2012, 08:09 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,880 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 2 Weeks 2 Days 22 h 45 m 55 sec
Reputation Power: 581
Where the page resides is not relevant. What matters is where the httpd that runs it resides with respect to the SMTP server. You should not have to make changes to php.ini to send mail. At this point you need to post your PHP code showing how you send the email.

Reply With Quote
  #5  
Old October 29th, 2012, 11:08 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,420 Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 10 h 50 m 32 sec
Reputation Power: 3896
If you are running windows then you will not have a local mail/SMTP server (unless you have added one yourself) so calling mail() will not send an email.

Further software and/or configurations will be needed

XAMPP does not install a local mail/smtp server.

Possible solution: get a hosted SMTP server (your own or through someone like sendgrid) and use PHPMailer to send out using SMTP
__________________
PHP OOPS! <?php DB::Execute(SQL::makeFrom($_GET))->fetchArray()->FormatWith(Template::getInstance('default'))->printHtml(); ?>

PDO vs mysql_* functions: Find a Migration Guide Here

[ Xeneco - T'interweb Development ] - [ Are you a Help Vampire? ] - [ Read The manual! ] - [ W3 methods - GET, POST, etc ] - [ Web Design Hell ]

Last edited by Northie : October 29th, 2012 at 11:10 AM.

Reply With Quote
  #6  
Old October 30th, 2012, 12:18 AM
BrightIdea BrightIdea is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 31 BrightIdea Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 5 m 21 sec
Reputation Power: 0
Quote:
Originally Posted by Northie
If you are running windows then you will not have a local mail/SMTP server (unless you have added one yourself) so calling mail() will not send an email.

Further software and/or configurations will be needed

XAMPP does not install a local mail/smtp server.

Possible solution: get a hosted SMTP server (your own or through someone like sendgrid) and use PHPMailer to send out using SMTP


I dont have a server myself and I am not want to send mails from my computer.

This hosting site the client has chosen is using has SMPT and POP3 and also has something called "FormMail", any good?

Thanks.

Reply With Quote
  #7  
Old October 30th, 2012, 04:16 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,420 Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 10 h 50 m 32 sec
Reputation Power: 3896
Quote:
Originally Posted by BrightIdea
something called "FormMail", any good?

No

=========================

Quote:
Originally Posted by BrightIdea
I dont have a server myself and I am not want to send mails from my computer.


errr, following your original post,

Quote:
Originally Posted by BrightIdea
did not receive an email


The point I am trying to make is

If you do not have a mail server you cannot send emails

no amount of tweaks to php.ini will solve this

Reply With Quote
  #8  
Old October 30th, 2012, 06:23 AM
BrightIdea BrightIdea is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 31 BrightIdea Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 5 m 21 sec
Reputation Power: 0
Quote:
Originally Posted by Northie
No

=========================



errr, following your original post,



The point I am trying to make is

If you do not have a mail server you cannot send emails

no amount of tweaks to php.ini will solve this


Ok then, I think there is some confusion from am I working server side or client side OR am I a client trying to implement a server side application/script and would like to know how to do it to receive replys from a html form.

A simple answer would have sufficed, I will have to assume that the server host is running Linux box not windows therefore my home computer setup is on windows totally void.

I need a mail server yes and have access to two or three, but I don't own one, do you?

I will look into formmail as it appears to have the basics I need, without having to delve into php scripting too hard at this time, mind you I like php, though my powers are very well stuck between HTML media, CSS2 and 3 Photoshop and XHTML 1.0 strict,

I am sure you get the picture that I cannot juggle everything with any success.

Dan

Reply With Quote
  #9  
Old October 30th, 2012, 06:35 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,420 Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 10 h 50 m 32 sec
Reputation Power: 3896
Quote:
I need a mail server yes and have access to two or three, but I don't own one, do you?


Yes,

I have one on all of my linux servers (1 dedicated, ~10 production VPSs and 5 dev VPSs), but none on any of my windows machines

Reply With Quote
  #10  
Old October 30th, 2012, 07:26 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,880 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 2 Weeks 2 Days 22 h 45 m 55 sec
Reputation Power: 581
Did I miss something? How are you running PHP pages on your Windows machine if you don't have an HTTPD running on it?

Assuming I am mistaken and you do have HTTPD running on your Windows box, you can still send email with PHPMailer if you have access to an SMTP server. I would also guess that your production HTTPD server has access to an SMTP server if it is not running one itself. You can still use PHPMailer to send mail by using that SMTP server instead of 'localhost', as I tried to suggest in my earlier post. This is not really that complicated.

Reply With Quote
  #11  
Old October 30th, 2012, 08:03 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,420 Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 10 h 50 m 32 sec
Reputation Power: 3896
He has a web server running locally, but not a local mail server

As we've both suggested, he could use PHP Mailer an any remote SMTP server he has authority to use/access

For whatever reason, he is ignoring this suggestion

Reply With Quote
  #12  
Old October 30th, 2012, 04:24 PM
BrightIdea BrightIdea is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 31 BrightIdea Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 5 m 21 sec
Reputation Power: 0
Thanks

There are a few lines in the php.ini file I have to change.

Like adding the ISP SMPT address (which could be mine or the one provided by the hosting site)

I assumed if I get hosting, I will be able to log into the sites Cpanel? and make the desired changes there?

Here is the code, it is not mine, I pulled it off the Internet where it was freely available on a website for use by visitors.

I do not necessarily set out to use this code, I just downloaded it to test my form on LocalHost.
As you can see there is no SMTP configuration in the script itself.

So this leads me to believe that this is either not the sort of function I need OR I have to configure the php.ini file.

I am thinking that a person might not have much access to the php.ini file on a host server (one that is hosted by a hosting business on remote server).

So this is what I was wondering.
PHP Code:
<?php
if(isset($_POST['email'])) {
     
    
// CHANGE THE TWO LINES BELOW
    
$email_to "premiunconnectors@bigpond.com";
     
    
$email_subject "Product Enquiry";
     
     
    function 
died($error) {
        
// your error code can go here
        
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
        echo 
"These errors appear below.<br /><br />";
        echo 
$error."<br /><br />";
        echo 
"Please go back and fix these errors.<br /><br />";
        die();
    }
     
    
// validation expected data exists
    
if(!isset($_POST['first_name']) ||
        !isset(
$_POST['last_name']) ||
        !isset(
$_POST['email']) ||
        !isset(
$_POST['telephone']) ||
        !isset(
$_POST['comments'])) {
        
died('We are sorry, but there appears to be a problem with the form you submitted.');      
    }
     
    
$first_name $_POST['first_name']; // required
    
$last_name $_POST['last_name']; // required
    
$email_from $_POST['email']; // required
    
$telephone $_POST['telephone']; // not required
    
$comments $_POST['comments']; // required
     
    
$error_message "";
    
$email_exp '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  if(!
preg_match($email_exp,$email_from)) {
    
$error_message .= 'The Email Address you entered does not appear to be valid.<br />';
  }
    
$string_exp "/^[A-Za-z .'-]+$/";
  if(!
preg_match($string_exp,$first_name)) {
    
$error_message .= 'The First Name you entered does not appear to be valid.<br />';
  }
  if(!
preg_match($string_exp,$last_name)) {
    
$error_message .= 'The Last Name you entered does not appear to be valid.<br />';
  }
  if(
strlen($comments) < 2) {
    
$error_message .= 'The Comments you entered do not appear to be valid.<br />';
  }
  if(
strlen($error_message) > 0) {
    
died($error_message);
  }
    
$email_message "Form details below.\n\n";
     
    function 
clean_string($string) {
      
$bad = array("content-type","bcc:","to:","cc:","href");
      return 
str_replace($bad,"",$string);
    }
     
    
$email_message .= "First Name: ".clean_string($first_name)."\n";
    
$email_message .= "Last Name: ".clean_string($last_name)."\n";
    
$email_message .= "Email: ".clean_string($email_from)."\n";
    
$email_message .= "Telephone: ".clean_string($telephone)."\n";
    
$email_message .= "Comments: ".clean_string($comments)."\n";
     
     
// create email headers
$headers 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' phpversion();
@
mail($email_to$email_subject$email_message$headers); 
?>
 
Thank you
 

 
<?php
}
die();
?>


Thanks

Reply With Quote
  #13  
Old October 31st, 2012, 04:18 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,420 Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 10 h 50 m 32 sec
Reputation Power: 3896
Please forget about the php ini settings.

I really think you're barking up the wrong tree looking for the solution to your problem

if you buy hosting, the host will have a mail server so the mail() function will just work.

By default, the mail() function adds messages directly to the mail queue. There are no smtp settings in any of my php ini files, but there is the path to sendmail (or equivalent)

I would also recommend not using PHP's built in mail function, but to get the PHPMailer library (its free, consists of 3 files plus some demo files) which will default to mail() but can also be easity configured to use SMTP for your local testing

Reply With Quote
  #14  
Old November 1st, 2012, 06:50 AM
BrightIdea BrightIdea is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 31 BrightIdea Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 5 m 21 sec
Reputation Power: 0
Quote:
Originally Posted by Northie
Please forget about the php ini settings.

I really think you're barking up the wrong tree looking for the solution to your problem

if you buy hosting, the host will have a mail server so the mail() function will just work.

By default, the mail() function adds messages directly to the mail queue. There are no smtp settings in any of my php ini files, but there is the path to sendmail (or equivalent)

I would also recommend not using PHP's built in mail function, but to get the PHPMailer library (its free, consists of 3 files plus some demo files) which will default to mail() but can also be easity configured to use SMTP for your local testing


Cheers Ill have a look.

Why do you not recommend the php mail() default?

Dan

Reply With Quote
  #15  
Old November 1st, 2012, 08:55 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,420 Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level)Northie User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 10 h 50 m 32 sec
Reputation Power: 3896
Because using mail() leads to problems - as you've found and PHPMailer has been around for years and has been thoroughly worked on, improved, re-factored to produce a library that works very reliably and takes out all the headaches associated with trying to send emails from PHP and meeting your SLAs

Because configuring PHPMailer to send out over SMTP is easier than configuring mail() to send out through such an SMTP connection

Because PHPMailer adds all the appropriate headers to make mail look less automates, less spammy

Because using PHPMailer makes it easy to send multi part messages

Because using PHPMailer makes it easy to send attachments

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Mail and PHP mail function

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap