PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Coding & Tutorials (http://www.phpdig.net/forum/forumdisplay.php?f=31)
-   -   "from" line in email (http://www.phpdig.net/forum/showthread.php?t=504)

hollycrj 02-10-2004 10:37 AM

"from" line in email
 
i'm not a technical person so i apologize if what i'm about to ask is somewhat confusing.

on our local intranet we have a person that use PHP to create forms and other items for us. we have an anniversary page that looks at a database for a hire date and sends the employee an email stating "happy anniversary". the problem is the email is coming from webmaster. this of couse is set up on the server end, my question is...is there a way to make the email appear it is coming from Human Resources without changing it on the server end? can we create a line in the programming that will reflect this.

any feedback you have is greatly appreciated.

thanks :)

vinyl-junkie 02-10-2004 05:05 PM

I have a form on my website which sends out e-mail like so:
Quote:

mail("$SendToEmail", $yoursubject, $emailtext, "From: $email");
$SendToEmail is the recipient's e-mail address.
$yoursubject is the e-mail subject line.
$emailtext is the body of the e-mail.
$email is the sender, so you could set that to the Human Resources e-mail address if you wanted to.

You can find out more about how the PHP mail function works here.

Hope this helps. :)

cybercox 06-29-2004 12:34 PM

hi all,
actually when you send an email (like in the example of vinyl junkie)
the last argument is a string containing additional headers.
This let you control a lot of funny things...
such as mime, extra headers, reply to fields,
priority....

Hope helps
Simone Capra
http://www.erweb.it


All times are GMT -8. The time now is 03:19 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.