Results 1 to 2 of 2

Thread: Routine Esterna invio mail

  1. #1
    ff76 is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    96

    Default Routine Esterna invio mail

    Ciao a tutti,


    ho creato una routine esterna per inviare una mail tramite phpmailer


    PHP Code:
    <?php
    if(!defined('sugarEntry'))define('sugarEntry'true);

    require_once(
    "include/phpmailer/class.phpmailer.php");

    $mailer = new PHPMailer();
    $mailer->IsSMTP();
    $mailer->SMTPAuth   true;                  // enable SMTP authentication 
    $mailer->SMTPSecure "ssl";                 
    $mailer->Host 'smtp.gmail.com';
    $mailer->Port '465';
    $mailer->SetLanguage('phpmailer.lang-it','include/phpmailer/language/'); 
    $mailer->Username 'mia_mail@gmail.com';  // Change this to your gmail adress
    $mailer->Password 'password';  // Change this to your gmail password
    $mailer->From 'mia_mail@gmail.com';  // This HAVE TO be your gmail adress
    $mailer->FromName 'Administrator'// This is the from name in the email, you can put anything you like here
    $mailer->Body 'This is the main body of the email';
    $mailer->Subject 'This is the subject of the email';
    //$mailer->AddAddress('dest_mail@gmail.com');  
    if(!$mailer->Send())
    {
       echo 
    "Message was not sent<br/ >";
       echo 
    "Mailer Error: " $mailer->ErrorInfo;
    }
    else
    {
       echo 
    "Message has been sent";
    }

    ?>

    Il problema è che non riesco ad inviarle...

    Mi esce fuori questo messaggio:

    CGI Timeout
    The specified CGI application exceeded the allowed time for processing. The server has deleted the process.


    Come mai invece se faccio una campagna riesco ad inviarle? C'è qualche parametro non corretto?

  2. #2
    fulvio is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Lesmo - MB
    Posts
    124

    Default Re: Routine Esterna invio mail

    Ciao
    La riga sotto è commentata anche nel tuo codice o solo nel
    testo di esempio che ci hai inviato ?

    //$mailer->AddAddress('dest_mail@gmail.com');

    Fulvio

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Module Installation routine
    By gacevedo in forum Developer Help
    Replies: 2
    Last Post: 2007-12-27, 11:41 AM
  2. Notifiche ed invio email
    By apsapsaps in forum Italiano
    Replies: 2
    Last Post: 2007-11-29, 01:54 PM
  3. Replies: 1
    Last Post: 2007-09-15, 02:59 PM
  4. Errore invio Email
    By Lujz in forum Italiano
    Replies: 0
    Last Post: 2005-12-22, 08:32 AM
  5. Backup as web service or cron-executable routine
    By eeric in forum Feature Requests
    Replies: 1
    Last Post: 2005-10-05, 06:28 PM

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
  •