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());
?>
----------------------------------
DNS/ MX record settings
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: DNS/ MX record settings
Sounds like you're sending via the wrong SMTP server, or you need to authenticate. What's the error? 
-
hendrik6073
- Forum Newbie
- Posts: 11
- Joined: Sun Apr 20, 2008 1:45 pm
Re: DNS/ MX record settings
The problem is solved (two weeks ago, sorry for my late response). i called my smtp bij localhost, that was prohibit, using is dns name solved the problemChris Corbyn wrote:Sounds like you're sending via the wrong SMTP server, or you need to authenticate. What's the error?