Mailto and PHP

Mailto and PHP

am 14.06.2007 18:37:45 von Phil Matt

De-lurking here. I am trying to modify a mailing script that I originally wrote to use a small form
to send mail to different people from a MySQL database. I would like to modify it so that instead of
using a form, the user's regular default email program opens on activating the link. I can't quite
figure out how to pass the right parameters. Here's the relevant part of the existing script:

echo'
'.$myrow[0].''.$myrow[1].''.$myrow[2].'
'. $myrow[4].'
".$myrow[1].",
".$myrow[2]).'"> height="17" alt="Click to send mail to this person" />
';


I want to change the link to mailto: instead of the other PHP page, and then pass the recipient
email address and recipient name and title, which are already there from the MySQL connection.

I've looked around for the right syntax, but it just escapes me. I have the Welling & Thompson book,
but it only mentions that this can be done, without a clue as to how to do it. Pardon my ignorance,
but this is not my area of expertise.

TIA for your collective wisdom!


--- P. Matt

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

Re: Mailto and PHP

am 14.06.2007 19:09:56 von James Gadrow

Phil Matt wrote:
>
> De-lurking here. I am trying to modify a mailing script that I
> originally wrote to use a small form to send mail to different people
> from a MySQL database. I would like to modify it so that instead of
> using a form, the user's regular default email program opens on
> activating the link. I can't quite figure out how to pass the right
> parameters. Here's the relevant part of the existing script:
>
> echo'
> '.$myrow[0].''.$myrow[1].''.$myrow[2].'
> '. $myrow[4].'
> > href="NEWmail.php?id='.urlencode($myrow[6]).'&recip='.urlenc ode($myrow[0]."
> ".$myrow[1].",
".$myrow[2]).'"> > class="imglink" width="20" height="17" alt="Click to send mail to this
> person" />
';
>
>
> I want to change the link to mailto: instead of the other PHP page,
> and then pass the recipient email address and recipient name and
> title, which are already there from the MySQL connection.
>
> I've looked around for the right syntax, but it just escapes me. I
> have the Welling & Thompson book, but it only mentions that this can
> be done, without a clue as to how to do it. Pardon my ignorance, but
> this is not my area of expertise.
>
> TIA for your collective wisdom!
>
>
> --- P. Matt
>
I think this is what you want:

http://www.ianr.unl.edu/internet/mailto.html

HTH!

--
Thanks,

Jim

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