|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 how I can insert the function's value inner mail? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> 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 > > how I can insert the function's value inner mail? Providing everything you have written is correct then it should work. 1 note however ensure that where you have c that it contains a valid header, if you do not want to send cuustom headers then omit this optional parameter. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Il Sat, 16 Jun 2007 21:06:21 +0100, peter ha scritto:
> mail(function_x('parameter_x'),'a', 'b', 'c'); so not work; is necessary to have some similar at: mail(print function_x('parameter_x'),'a', 'b', 'c'); |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
artev wrote:
> so not work; It should work, maybe posting the whole function could be nice ? As obviously the problem lays there... > is necessary to have some similar at: > mail(print function_x('parameter_x'),'a', 'b', 'c'); No not at all, print would show the information on screen (to the client) and return a boolean (1) for return value... From the PHP documentation: <snippet> Description int print ( string $arg ) Outputs arg. Returns 1, always. </snippet> So if you use print, you'd be doing this: mail (1, 'a', 'b', 'c'); // And the client would see the return value of function_x (); HTH, S. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Sat, 16 Jun 2007 18:44:40 +0200, artev <mailnotspammm@notspamm.nn>
wrote: > function_x is a function; > > if I write this: > print function_x('parameter_x') ; > at screen I have: infox@sito.com (one email) Are you looking at the HTML source, or the screen? I recall a few months ago someone who actuually had something like '<b>mail@examle.com</b>' instead of just the address.... > 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 > > how I can insert the function's value inner mail? It should work, examine your string carefully. -- Rik Wasmus |
|
![]() |
| Outils de la discussion | |
|
|