Hi
I want to try swift on my server but I'm having some problems...
The tests didn't work, neither did a code for a basic email
the error i get is:
Fatal error: Call to undefined function: is_a() in /home/.../lib/Swift.php on line 91
The php version in that server is 4.1.2
How can i fix this error?
thanks
[SOLVED] Error sending a basic email
Moderators: Chris Corbyn, General Moderators
[s]thanks
I tested in another server and it worked, however when i used batchSend i had another problem:
1- testing local it works just fine
2- testing on my www server i never receive the e-mails and it doesn't show me any error messages
the code is kinda like this:
I don't think that code is wrong, it worked fine in my localhost. What could be causing this? maybe I need to auth the smtp before sending the emails?[/s]
Problem solved
I just had to add authentication
thanks
I tested in another server and it worked, however when i used batchSend i had another problem:
1- testing local it works just fine
2- testing on my www server i never receive the e-mails and it doesn't show me any error messages
the code is kinda like this:
Code: Select all
// carrega swift mailer
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
$swift =& new Swift(new Swift_Connection_SMTP("smtp.mydomain.com.br"));
// here comes body, load client data from DB...
while ($client = mysql_fetch_array($query)) {
...
$message =& new Swift_Message($assunto, $corpo_inteiro, "text/html");
$recipients =& new Swift_RecipientList();
//$recipients->addTo($client["email"]); # as comment just to test
$recipients->addTo("rodrigo@mydomain.com"); # I SHOULD RECEIVE THE EMAILS ON THIS ADDRESS BUT THEY NEVER SHOW UP
}
// now send the email
$swift->batchSend($message, $recipients, new Swift_Address("newsletter@mydomain.com.br", "My Website"));Problem solved
I just had to add authentication
thanks