Thanks to all. The problem is caused by a server restriction.
SourceForge.net does not allow to send emails from PHP.

Bye!

2009/1/17 Morris <morris...@gmail.com>:
> If you are using apache + php, check php.in your server is able to support
> the mail() function and you have correctly set up the send and return
> address.
>
> 2009/1/17 Ashley Sheridan <a...@ashleysheridan.co.uk>
>>
>> On Fri, 2009-01-16 at 15:25 +0100, Sergio Jovani wrote:
>> > Hi,
>> >
>> > Thanks for replying. Adding "From" header did not solve the problem.
>> > I'm thinking is a server limitation. Could it be?
>> >
>> > 2009/1/16 Thiago H. Pojda <thiago.po...@gmail.com>:
>> > > On Fri, Jan 16, 2009 at 10:36 AM, Sergio Jovani <lese...@gmail.com>
>> > > wrote:
>> > >>
>> > >> Hi!
>> > >>
>> > >> I have working at SourceForge.net project web space Drupal as CMS. I
>> > >> have many modules installed related with email like Contact,
>> > >> Notify...
>> > >> This modules never worked and I tried send an email from email php
>> > >> function. I did it with:
>> > >>
>> > >> <?php
>> > >> $to = "myem...@gmail.com";
>> > >> $subject = "Hi!";
>> > >> $body = "Hi,\n\nHow are you?";
>> > >> if (mail($to, $subject, $body)) {
>> > >>  echo("<p>Message successfully sent!</p>");
>> > >>  } else {
>> > >>  echo("<p>Message delivery failed...</p>");
>> > >>  }
>> > >> ?>
>> > >>
>> > >> This does not work too. Is there any issue with email sending from
>> > >> SourceForge.net?
>> > >
>> > >
>> > > Looks like you're missing the "From: " part of the email. That's
>> > > probably
>> > > your issue. I never used sourceforge, but I know many hostings require
>> > > you
>> > > to specify a sender.
>> > >
>> > > from http://php.net/manual/en/function.mail.php
>> > >
>> > > <?php
>> > > $to      = 'nob...@example.com';
>> > > $subject = 'the subject';
>> > > $message = 'hello';
>> > > $headers = 'From: webmas...@example.com' . "\r\n" .
>> > >     'Reply-To: webmas...@example.com' . "\r\n" .
>> > >     'X-Mailer: PHP/' . phpversion();
>> > >
>> > > mail($to, $subject, $message, $headers);
>> > > ?>
>> > >
>> > >
>> > > Thiago Henrique Pojda
>> > > http://nerdnaweb.blogspot DOT com
>> > >
>> > >
>> > >
>> >
>> What's the return code you get from your mail() call?
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to