Hi,
i placed the php in windows server 2003 manually , set the path in Environmental variables , and place the php.ini file in windows.
Now php works fine in my server sytem.When i write the mail sending code and run that program mail didn't sent.
in my php.ini file consists the
smtp=localhost
smtp_port=25
sendmail_from=m e@localhost.com
In my smtp settings:
Internet Information Services->righclick on default virtual smtp server->properties->Access tab->Relay->add the my system IP address and 127.0.0.1 ip address .
We think there is no problem from smtp settings.Becaus e we run the jsp mail sending in same server machine .It works fine and mail sent .
Here is the php code we have used -
<?php
-
$to ="email@domain.com";
-
$subject = "Test Mail";
-
$message = "hello how are you";
-
$headers = "MIME-Version: 1.0\n";
-
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
-
$headers .= "X-Priority: 3\n";
-
$headers .= "X-MSMail-Priority: Normal\n";
-
$from = "me@example.com";
-
$headers .= "From: $from";
-
mail($to,$subject,$message,$headers);
-
?>
-
Please tell that whats the probelem in that.
3 1722 Dormilich 8,658
Recognized Expert Moderator Expert
PHP's mail() function doesn't use the smtp server. (see manual entry below)
if you want to use your smtp server, try Swift Mailer or PHP Mailer
Requirements
For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.
dlite922 1,584
Recognized Expert Top Contributor
Does your smtp server require a username and password or authentication?
Dan @swethak @dlite922
No.I put the option as Anonymous access.So i didn't set the username and password.
Please give the suggestion.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mike the Canadian |
last post by:
I am having a very strange problem sending email with php. I have two
domains. I can send an email to one domain using php but not the
other. If I put both email addresses in the mail command only the one
email will arrive. I can send emails the traditional way to the
problem domain and they arrive fine. Is there anything that might
explain this?
_______
Free Windows Clipboard Utility
http://www.clipboardmagic.com/
|
by: VB Programmer |
last post by:
I have an ASPX page where I send out emails through my mail server
mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends
PERFECTLY. When I try sending an email to any other address
(non-MyDomain.com address) I get the following error:
The server rejected one or more recipient addresses. The server response
was: 550 You must check your mail from this IP or SMTP Auth before sending
to BSmith@Juno.com
Here's the FULL...
|
by: splicemix |
last post by:
Hi all,
I have recently set up a Drupal website. I am a beginner. My shared
host server does not allow nobody@localhost to send emails, and
prevents access to php.ini, so I spent some time getting a SMTP script
running. While the Drupal feedback module and the new account creation
works fine in terms of sending of mails, I am having some problems with
the sending of password reminder emails.
warning: Cannot modify header information -...
|
by: k.visube |
last post by:
In my ASP application,i need to send a formatted text mail (i.e with
newline characters).
here in my application i used a function in javascript which construts
the mail body
sample snippet
strbody=strbody +"dear customer,\n";
strbody=strbody +"we are glad to see ur response\n";
strbody=strbody +"we will make the needful thing as early as
possible\n";
|
by: =?Utf-8?B?YmFyYnlxMTA=?= |
last post by:
After sending mail, it leaves the outbox as normal and clears and hits the
sent folder, but then I get a popup box that states
EMAIL PROBLEM
One or more e-mail messages cannot be sent.
Details
| |
by: sweatha |
last post by:
Hi
I have the normal server and not the SMTP service installed. I need to send a mail once if I click a button. Can anybody help me regarding that
|
by: cnsabar |
last post by:
Hi.,
I am using following code to send sms through e-mail
use Mail::Sendmail;
%mail = (To => '10digitMobileNo@airtelkk.com',
From => "mymail\@company.com",
Message => "SMS Server"
);
|
by: Dormilich |
last post by:
this is a follow-up thread to this one.
http://bytes.com/topic/html-css/answers/863662-form-not-submitted-sometimes
I figured out that the mail sending class triggers the described error. unfortunately, no error message is given by the system.
<?php
class Mail_Tabelle extends Mail_DB
{
protected $description = false;
const TBL_HEAD = '
<thead>
|
by: ThatThatGuy |
last post by:
Hello reader,,
This might be a very simple question, but what to just say about it, i'm facing it
Actually i'm developing a web App and i want email feature in that....
I'm sending mail from my development machine i.e localhost
This is the setting in web.config
<system.net>
<mailSettings>
|
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...
|
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...
| |
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,...
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |