PHPMailer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abasel
    New Member
    • Jun 2007
    • 1

    PHPMailer

    I've been looking everywhere for a forum dedicated to this script but so far could only find a mailing list.

    I Have two questions:

    1) What doe the following mean?

    Warning: fsockopen() [function.fsocko pen]: php_network_get addresses:
    getaddrinfo failed: Name or service not known in
    /home/intern/public_html/demo/lib/phpmailer/class.smtp.php on line 105

    Warning: fsockopen() [function.fsocko pen]: unable to connect to
    smtpxtraconz:25 in
    /home/intern/public_html/demo/lib/phpmailer/class.smtp.php on line 105
    There was a problem sending this mail!

    This is my config file [code=php]
    <?php

    // Configuration settings for My Site

    // Email Settings
    $site['from_name'] = 'PHPMail'; // from email name
    $site['from_email'] = ' xxxx@gmail.com' ; // from email address

    // Just in case we need to relay to a different server,
    // provide an option to use external mail server.
    $site['smtp_mode'] = 'enabled'; // enabled or disabled
    $site['smtp_host'] = smtp.xtra.co.nz ;
    $site['smtp_port'] = null;
    $site['smtp_username'] = *********;
    ?>[/code]

    [Please use CODE tags when posting source code. Thanks! --pbmods]

    2) I would prefer to use the php mail() instead of SMTP but my host only
    allows 100 e-mails per hour and I need more for my client base. Is it
    possible to set up PHPMailer so that if I use mail() it does so via a
    different server?... not sure if I'm making sense?

    Thanks
    André
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, André. Welcome to TSDN!

    Check this line:
    [code=php]$site['smtp_host'] = smtp.xtra.co.nz ;[/code]

    The value should be in quotes b/c PHP is turning this into 'smtpxtraconz'.

    Comment

    Working...