You are here: Re: function inner mail not work « All PHP « IT news, forums, messages
Re: function inner mail not work

Posted by J.O. Aho on 06/17/07 11:31

artev wrote:
> function_x is a function;
>
> if I write this:
> print function_x('parameter_x') ;
> at screen I have: infox@sito.com (one email)
>
> but if I write so:
>
> mail(function_x('parameter_x'),'a', 'b', 'c');
> I have this error:
> SMTP server response: 554 DATA Transaction failed, no recipients given

function something($indata) {
return trim($indata);
}
mail(something('user@example.net'),$a, $b, $c);

You have to see to that the out data is in a form that is accepted by the mail
server, don't use withe spaces, if you need a space, don't forget to encluse
the string with double quotes and so on.

> how I can insert the function's value inner mail?
>
> I tested so:
> mail(print function_x('parameter_x'),'a', 'b', 'c');
> but have parse error;

of course, echo out in a function argument ain't allowed.


> so is important to extract the value from function
> (I cannot change the function, but with print I have the value;
> so isn't possible to write this value inner mail?)

As we don't know what your function does or what data you input, we can't say
why the outdata isn't generating a valid to address.


--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация