Chris Corbyn wrote:A blank screen indicates a fatal error. There are things in that code you can't just copy & paste. For example, the require_once() calls will need changing so they are using the correct path to Swift.
EDIT | I must stress, the smoke tests are not an "example". They are only there to make sure it works.
i did now check the require_once() function
but i'm still geting plank screen
do you hav any idea what is wrong
or what that code need to be able to work
like i sayed i need simple working code to start with
can you chat with me ?
here is the link to the file on the server
and i have edit the code
and this is the new one
pleases advice me with the right code
http://www.freehost99.com/home/mail/swi ... tbatch.php
Code: Select all
<?php
//Load in the files we'll need
require_once "/home/mail/swift5/lib/Swift.php";
require_once "/home/mail/swift5/lib/Swift/Connection/SMTP.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("smtp.gmail.com"));
//Create the message
$message =& new Swift_Message("just subject", "just body for my emails");
//Now check if Swift actually sends it
$stream =& $message->build();
echo $stream->readFull();
if ($swift->send($message, "zamaliphe@gmail.com", "zamaliphe@gmail.com")) echo "Sent";
else echo "Failed";
?>
ok after i added thos tow line to view the masseg that is about to sent
i get this
Code: Select all
To:
From:
Subject: just subject
Date: Thu, 24 Apr 2008 21:36:19 -0400
X-LibVersion: 3.3.2
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
just body for my emails
hmm where is the to and from fild ? and why thay are empty
and thanks agin for your grate script and for your fast answer
