SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem emailing with PHPMAILER script

    I've been trying to configure phpmailer script to send email after having submitted a form.

    However, I keep getting this error message:

    Message was not sent

    Mailer Error: Language string failed to load: from_failedmyemail@mydomain.com
    Here's part of the php code:
    PHP Code:
    require("class.phpmailer.php");

    $mail = new PHPMailer();
    $mail->Mailer   "smtp";
    $mail->IsSMTP();                                   // send via SMTP
    $mail->Host     "smtp.myisp.com"// SMTP servers
    $mail->SMTPAuth true;     // turn on SMTP authentication
    $mail->Username "myispusername";  // SMTP username
    $mail->Password "myisppassword"// SMTP password

    $mail->From     "myemail@mydomain.com";
    $mail->FromName "My Name";
    $mail->AddAddress($Email); 
    $mail->AddCC("myemail@mydomain.com");

    $mail->WordWrap 50;                              // set word wrap
    $mail->IsHTML(false);                               // send as HTML 
    I've tried to find the answer on my own through my web host's forums, however, I'm still scratching my head as it's not sending any email.

    Any help would be great!

    Thanks!

  2. #2
    SitePoint Wizard Nikolas's Avatar
    Join Date
    Feb 2005
    Location
    Greece
    Posts
    1,222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The error that you get is not the error it self, but the message that sais that it can't locate the error message (because you haven't upload the files with the errors)

    Did you tried to use :

    PHP Code:
    $mail->IsSendmail(); 
    ?

    The above type don't require to have sendmail in your server, as php has a way to pretend it has (it is some php.ini settings that are used for that)

  3. #3
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion Nikolas,
    I've changed it to use sendmail instead and I don't get the error message now.

    However, I still don't receive any email from the form.

    I've had this problem with a few different scripts - everything seems to go ok except that no email ever arrives.

    Any ideas? Anyone else have this problem?

    thanks!

  4. #4
    Non-Member I87's Avatar
    Join Date
    Mar 2006
    Location
    UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're on a dedicated server, make sure you allow "nobody" to send mail. You're prone to spamming alittle more, but this was the problem with a clients script.

  5. #5
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my site's on a shared server, don't know if it's a problem with the web host in that case?

  6. #6
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It looks like I've found the problem, ends up my web host disabled all the mail functions on the shared server I'm on (of course without notifying anyone else!!!)

    thanks for all your help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •