473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PHP + sendmail - from

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
1 1588
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Babaloo | last post by:
Hello, I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except email. I have a test script to send mail, I have sendmail_path = '/usr/lib/sendmail -t -i' set in php.ini,...
4
by: jim | last post by:
Hello, I am having a problem w/SendMail reporting: " No recipient addresses found in header". Funny thing is though, I properly recieve the email message. Thanks for your help. -jim
2
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
1
by: Shelly | last post by:
I want to be able to create a sendmail account by commands sent from a web page. I am using php. After everything is done, I want to enter his info into the database (easy) and create this...
1
by: Gaz | last post by:
Hey. I looked at the Sendmail help and did not find a property where i can get an "ok" signal when the email is finally sent. I need something like that to show a "Processing, please stand by"...
3
by: swangdb | last post by:
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have Majordomo and Listproc installed on this server and they work. I have several production majordomo and listproc mailing lists...
4
by: Nilesh | last post by:
I have a server in which sendmail gives problem. How do i change php.ini so that i can use exim for mail() System is FC-6.
11
by: Taras_96 | last post by:
Hi all, The PHP manual states that: "The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only...
3
by: digitaldiva | last post by:
Hi I am new here and once upon a time I worked with Perl, now I am trying again and need some help: I wrote a Perl script a few years ago that opened an order entry TXT file and sent each...
2
jhoborg
by: jhoborg | last post by:
Hello all, So I'm having trouble using sendmail in a CGI script as the topic title says. Here's what I'm trying to accomplish: User fills out a form, submits it, my CGI script receives this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.