473,597 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*******@faked omain.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 1651
tz**********@ya hoo.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*******@faked omain.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*******@attgl obal.net
=============== ===
Jul 17 '05 #2

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

Similar topics

1
1734
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 ! mark from mail body before passing it to mail() function but then also it adds ! mark in mail body. Can you please tell me why this is happening? Thanks
8
5072
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 <b>$_POST</b><br><br>\n\n"; print "Your message was:<br><br>\n\n";
7
1377
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. Here's a sample script: if (mail("xxx@xxx.com", "test mail", "This is a <B>test</B>!", "From:
8
5460
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 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
0
959
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 finishing correctly and blocking the thread from launching the new form. I'm testing it in form_load() but this shouldn't matter.
1
1334
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 application? If I have the SMTP service installed and running in the same IIS(where my web application is also running) will that be sufficient. Do I need some other SMTP server also.
12
4563
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, one I am currently developing. I am testing the mail functionality by sending a test message to an email account associated with my old website, and to my hotmail account. The message seems to be sent to both accounts, and I receive the message on...
5
1714
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 I receive a plain text email. However, the people for which I'm doing the site receive some kind of error when I do the same thing but delivered to them mail($their_email, $title, $message)
7
2620
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 fine when I use thunderbird to send mail to it and used to work fine under windows however... It doesn't work under Ubuntu. Looking at my php.ini file I see...
0
7886
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8272
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8035
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5431
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2404
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1238
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.