On Feb 16, 2008 8:36 AM, dandreta <[EMAIL PROTECTED]> wrote:
>
> And how can I do this?
> Any another suggestion or help?
>
> On 15 feb, 21:26, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > First off, make a little test.php plain PHP file that verifies that
> > you can send email using PHP's built-in email 
> > functionality:http://us2.php.net/mail
> >
> > Then make a little test in a Cake controller that you can call
> > directly which does the same thing. Then you can worry about the
> > emailcomponent etc.
> >
> > Wayne
> >
>

<?php
/* fill in the following:
 */
$email_from = FROM_ADDRESS;
$email_sender = SENDER_ADDRESS;
$email_to = TO_ADDRESS;

$headers = "From: <${email_from}>\n"
                . "Reply-To: <${email_sender}>\n"
                . "Return-Path: <${email_sender}>\n"
                . 'Date: ' . date('r') . "\n"
                . "Content-Disposition: inline\n"
                . "Content-Type: text/plain; charset=utf-8\n"
                . "\n";

/* try setting the envelope sender if the first doesn't work
 */
$params = null;
//$params = "-f${email_sender}";

echo (mail($email_to, 'test mail', 'test, $headers, $params) ? 'sent'
: 'not sent');

?>

read this carefully:
http://www.php.net/manual/en/function.mail.php

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to