DNS/ MX record settings
Posted: Fri May 02, 2008 6:03 am
Hi,
Since a few days i am working/testing things with Swiftmailer.
With help from this forum, the mail function fits my needs.
I can go live now, So i changed my test (private domain) mail account into a account
that's on the public domain.
I use my own Exchange server, thats working fine sends mail inside
and outside my domain. PhP version is 5.
When i try to send mail to an public domain, it fails. It looks like Swiftmailer cannot communicate
to check the address.
- is there a way to finf out why mail fails ?
- is there some setting i need to change to let Swiftmailer use the right dns / mx records ?
script i use:
---------------------------------
<?php
//printf("Memory limit is %d bytes", ini_get('memory_limit'));
$link = $_GET['link'];
$mailadres = $_SESSION['boxuser']['mail'];
$naam = $_GET['naam'];
$titel = $_GET['titel'];
$formaat = $_GET['formaat'];
$omschr = "$naam - $titel.$formaat";
//error_reporting (E_ALL ^ E_NOTICE);
set_time_limit(0);
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
require_once "lib/Swift/Connection/NativeMail.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("localhost"));
Swift_CacheFactory::setClassName("Swift_Cache_Disk");
Swift_Cache_Disk::setSavePath("tmp");
//Create the message
$message =& new Swift_Message("Uw aangevraagde download van", "Hierbij ontvangt u de gevraagde download");
//Use the Swift_File class
$message->attach(new Swift_Message_Attachment(new Swift_File("/\\192.168.1.9/jukebox_content$link"),"$omschr"));
//Now check if Swift actually sends it
if ($swift->send($message, "address@publicdomain", "addess@privatedomain")) echo "$omschr is succesvol naar $mailadres verzonden";
else echo "Failed";
//error_reporting ();
//printf("Peak memory usage was %d bytes", memory_get_peak_usage());
?>
----------------------------------
Since a few days i am working/testing things with Swiftmailer.
With help from this forum, the mail function fits my needs.
I can go live now, So i changed my test (private domain) mail account into a account
that's on the public domain.
I use my own Exchange server, thats working fine sends mail inside
and outside my domain. PhP version is 5.
When i try to send mail to an public domain, it fails. It looks like Swiftmailer cannot communicate
to check the address.
- is there a way to finf out why mail fails ?
- is there some setting i need to change to let Swiftmailer use the right dns / mx records ?
script i use:
---------------------------------
<?php
//printf("Memory limit is %d bytes", ini_get('memory_limit'));
$link = $_GET['link'];
$mailadres = $_SESSION['boxuser']['mail'];
$naam = $_GET['naam'];
$titel = $_GET['titel'];
$formaat = $_GET['formaat'];
$omschr = "$naam - $titel.$formaat";
//error_reporting (E_ALL ^ E_NOTICE);
set_time_limit(0);
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
require_once "lib/Swift/Connection/NativeMail.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("localhost"));
Swift_CacheFactory::setClassName("Swift_Cache_Disk");
Swift_Cache_Disk::setSavePath("tmp");
//Create the message
$message =& new Swift_Message("Uw aangevraagde download van", "Hierbij ontvangt u de gevraagde download");
//Use the Swift_File class
$message->attach(new Swift_Message_Attachment(new Swift_File("/\\192.168.1.9/jukebox_content$link"),"$omschr"));
//Now check if Swift actually sends it
if ($swift->send($message, "address@publicdomain", "addess@privatedomain")) echo "$omschr is succesvol naar $mailadres verzonden";
else echo "Failed";
//error_reporting ();
//printf("Peak memory usage was %d bytes", memory_get_peak_usage());
?>
----------------------------------