General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 28th, 2003, 08:24 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 117 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 29 sec
Reputation Power: 6
mail function prob (from)

Hi guys,

In this statement, it works and i can see my name and email shown in the email i received
code:
$from="From: Alice <alice@yahoo.com>";

but when i change this and pass the argument
$fname = alice and $email = alice@yahoo.com,
it doesn't show anything already except in the contents of the email..

Did i miss something or i can not put variables in the from when using mail function ?

Please advise.

code:
$from="From: $fname <$email>";

p.s: in the email, it just show from Apache.

Reply With Quote
  #2  
Old October 28th, 2003, 09:51 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 117 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 29 sec
Reputation Power: 6
when i added \"$fname\", it works, but when i added additional code
$from="cc:alice2@yahoo.com\n";

it does cc to that email add but the sender info turns back to Apache rather than the input i inserted..

please advise.

Reply With Quote
  #3  
Old October 29th, 2003, 07:49 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
You're setting your from variable to a cc address. Try this:

PHP Code:
 $headers="From: " $fname " <" $email ">\nCC: [email]alice2@yahoo.com[/email]\n";
mail($to,$subj,$msg,$headers); 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > mail function prob (from)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT