473,383 Members | 1,725 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,383 software developers and data experts.

mail() function doesn't seem to be sending MAIL FROM: properly

I'm trying to send an email using the mail() function. I've carefully
made use of the ini_set(SMTP, "mail.my.server") function to set my SMTP
server and also to set my From: address. I'm still getting a "Relaying
not explicitly allowed: fa*******@fakedomain.com" response from the
server however, when I try and set a recipient who is outside of my own
domain. This makes my think that the From: address is somehow not
getting sent to my server properly or that I'm pointing at the wrong
server.

The confounding thing is that it was working for a while and I don't
think I changed anything and it just stopped.

I'm running these PHP pages for a client off of one of those cheap
hosting services, I think it's called 1dollarhost.com or something,
although I can't remember at the moment.

Has anyone else had trouble with this or found a solution?

Many thanks,
Todd

Jul 17 '05 #1
1 1643
tz**********@yahoo.com wrote:
I'm trying to send an email using the mail() function. I've carefully
made use of the ini_set(SMTP, "mail.my.server") function to set my SMTP
server and also to set my From: address. I'm still getting a "Relaying
not explicitly allowed: fa*******@fakedomain.com" response from the
server however, when I try and set a recipient who is outside of my own
domain. This makes my think that the From: address is somehow not
getting sent to my server properly or that I'm pointing at the wrong
server.

The confounding thing is that it was working for a while and I don't
think I changed anything and it just stopped.

I'm running these PHP pages for a client off of one of those cheap
hosting services, I think it's called 1dollarhost.com or something,
although I can't remember at the moment.

Has anyone else had trouble with this or found a solution?

Many thanks,
Todd


Todd,

Your hosting service probably requires authentication to send mail.
Otherwise they'd be open relays for spammers - just put your email
address in the From: field and send away.

One way is to run a mail server on your test machine - but ensure you
have port 25 firewalled or you will become an open relay.

A better way is to use PHPMailer which will do SMTP authentication.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: prasanna | last post by:
Hello I tried to send mail from PHP in html format. But an ! mark appears in mail body in Inbox. I tried to print body text on page before sending mail and it does not show ! mark. I replaced !...
8
by: Robert | last post by:
Hi, I'm getting an error when I try sending an email from some code I have written: "<?php print "Thank you, <b>$_POST</b>, for your message!<br><br>\n\n"; print "Your e-mail address is...
7
by: Juul | last post by:
Hi, My hostingprovider just updated to PHP 4.4. Since that time I have problems using the mail() function in PHP. I can't send headers anymore and my provider don't know what's wrong. ...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
0
by: Adam Honek | last post by:
I'm having this odd bahaviour with the new .net.mail SMTP sending code below. It either gives me an exception error or no error but the main form doesn't show making it seem as if it's not...
1
by: Krish | last post by:
Hi All, I am trying to send email from my web application. I am using the System.Net.Mail name space for the same. Now my question is what all are required for having this capability in my web...
12
by: e_matthes | last post by:
Hello everyone, I am trying to use the mail() function to send a simple, text-only message. I have two websites hosted by the same company, on different servers. One is old and established,...
5
by: Sebzzz | last post by:
Hi, I'm working on a website where there is a from from which I want to send the data by e-mail. When I send myself the result with mail($my_email, $title, $message) everything works fine and...
7
by: r0g | last post by:
I'd like PHP to send mail to a local mailserver running at localhost:25 like I used to on windows. This mailserver is a dummy server which just writes the mail to disk for unit testing and works...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.