•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,526 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,807 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 509 | Replies: 1
![]() |
•
•
Join Date: Oct 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I just wrote my first mail script in php. It is working well, but I cannot control
the senders email address or name. I would like to at least choose senders name.
Here is the code I am using
I have tried using $from = "emailaddress@email.com"
and also From "emailaddress@email.com" in the mail() tag
No matter what I put I get this...
youngloks@linhostssl08.prod.mesa1.secureserver.net
Can someone help me. Also, this script works on my GoDaddy server but not on my server
with cPanel.
Thanks in advance.
the senders email address or name. I would like to at least choose senders name.
Here is the code I am using
<?php $email=$_POST['email']; $subject = "New Mailing List Signup"; $body = "test email script"; mail($email,$subject,$body) ?>
I have tried using $from = "emailaddress@email.com"
and also From "emailaddress@email.com" in the mail() tag
No matter what I put I get this...
youngloks@linhostssl08.prod.mesa1.secureserver.net
Can someone help me. Also, this script works on my GoDaddy server but not on my server
with cPanel.
Thanks in advance.
•
•
Join Date: Oct 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I figured it out on my own. Here is the answer for anyone else who might have the same problem.
Now it works exactly as I needed it to
<?php $email=$_POST['email']; $subject = "New Mailing List Signup"; $body = "test email script"; $header='From: Name<name@website.com>'; mail($email,$subject,$body,$header) ?>
Now it works exactly as I needed it to
Last edited by lilokster : Oct 3rd, 2007 at 1:39 am. Reason: forgot closing tags
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- PHP Mail Error (PHP)
- Sending HTML email via PHP mail function (PHP)
- PHP mail() (Sendmail) Problem :( (PHP)
- PHP mail Help (PHP)
- PHP Mail with Sender ID (PHP)
- Problems with PHP mail function. (PHP)
- php mail form - need to redirect to new page (PHP)
- how do you setup php mail()? using sendmail and yellowdog linux w/apache and php4 (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: PHP Problem, not sure what's causing.
- Next Thread: pase xml with php


Linear Mode