By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

PHP + sendmail - from

P: n/a
He
I want to send e:Mail from PHP script
How to configure server to send proper 'from' parameter
(but for two domails mydomain1.com and mydomail2.com)
I want to send mail from script:
mail($to, $subject, $txt, $headers);

My mail is rejected by server who says that is wrong domain for:
www-data@debian
If I change hostname in my server to domain1.com - is OK but I nead two
domains at the same time

- How to setum PHP or sendmail?
- how to send infomation from script that I send from domain1.com or
domain1.com?

-- I use debian sendmail and PHP ---


Aug 29 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Piotr wrote:
He
I want to send e:Mail from PHP script
How to configure server to send proper 'from' parameter
(but for two domails mydomain1.com and mydomail2.com)
I want to send mail from script:
mail($to, $subject, $txt, $headers);

My mail is rejected by server who says that is wrong domain for:
www-data@debian
If I change hostname in my server to domain1.com - is OK but I nead two
domains at the same time

- How to setum PHP or sendmail?
- how to send infomation from script that I send from domain1.com or
domain1.com?

-- I use debian sendmail and PHP ---


Well, you didn't show any code, so it's very difficult to tell what
you're doing wrong. But it looks like you never specified the From header:

$hdr='@us**@example.com';

If you have any other headers (i.e. Mime version, etc.), add them such as:

$hdr .= "\rMIME-Version: 1.0";

And so on.

Then in your mail command you use:

main ($to, $subject, $message, $hdr);

And please - when using example domain names, use example.com,
example.org, etc. Those are reserved for just such usage.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 29 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.