LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-14-2013, 02:00 PM   #1
CincinnatiKid
Member
 
Registered: Jul 2010
Distribution: Mageia-3
Posts: 399

Rep: Reputation: 33
PHP Mail and Faxing


I am signed up with a faxing company (www.efaxcorporate.com). They allow you to send a fax by email. For example, from the email account associated with my efaxcorporate account, I can send an email that goes to a fax machine by sending the email to [faxnumber]@eFaxsend.com. I use this function all the time and it works.

I want to be able to do this from PHP instead of just from a mail client, so I tried this:

Code:
mail ("faxnumber@eFaxsend.com", "My Subject", "Hello World.", "From: myemailaddress@mydomain.com");
This does not work, the fax does not get delivered. I also tried using SMTP Authentication in the PHP code, and that didn't work either. obviously the fax company detects that this is not a "true" email, what is different about using PHP mail and using a mail client, or a web mail client?

Can you think of any way I can make this work?
 
Old 02-15-2013, 02:59 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,457

Rep: Reputation: 104Reputation: 104
If the email "From" address contains a different domain than the mail server your email will very likely be regarded as spam. Send yourself an email from the script and take a look at the email headers.
 
Old 02-15-2013, 09:04 AM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,287

Rep: Reputation: 97
j-ray has a point, but you can often also add additional allowed hosts in many services. In addition to this if you have an SPF record you should add the server it's coming from to the record.
 
Old 02-15-2013, 10:53 AM   #4
CincinnatiKid
Member
 
Registered: Jul 2010
Distribution: Mageia-3
Posts: 399

Original Poster
Rep: Reputation: 33
It is actually the same domain, it is where my email is hosted. I checked the headers and the domain is the same.
 
Old 02-15-2013, 10:04 PM   #5
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,287

Rep: Reputation: 97
Can you send yourself an email and look for any differences? Plus can you contact tech support for the fax service and see if their logs are receiving/processing the php emails?
 
Old 02-21-2013, 03:25 PM   #6
CincinnatiKid
Member
 
Registered: Jul 2010
Distribution: Mageia-3
Posts: 399

Original Poster
Rep: Reputation: 33
FYI, I figured out the issue, I used a fifth parameter for mail(), see below:

Code:
mail ("faxnumber@eFaxsend.com", "My Subject", "Hello World.", "From: myemailaddress@mydomain.com", "-f myemailaddress@mydomain.com");
With this fifth parameter, the message is no longer being flagged as spam, thanks for the ideas people.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Mail (using automatically a mail from the virtual domian) erosbk Linux - Server 1 04-25-2011 01:35 PM
PHP - Mail.php and Mail/mime.php issues LVsFINEST Linux - Server 1 02-08-2009 06:44 PM
Want to send mail with php mail() command - minimum config required? FeathersMc Linux - Server 2 10-26-2008 01:21 AM
PHP Website with e-mail forms, what mail daemon? gbkyle Linux - Software 1 07-05-2005 01:33 PM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 07:06 PM


All times are GMT -5. The time now is 10:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration