Hi guys,
I am really,really confused about mail servers and their use. I want to send email from my php and someone told to install a mail server. I installed argosoft mail server and it says it has sent the email address and i can see a report in argosoft that it has recieved a message from my server(localhost). But what i want is to send the email to an external server, say i wanna send email to phpcrazy@yahoo.com. How can i do that? What is the role of mail servers here and which one would you recommend me to use in my site?
7 2159
Are you using the php mail() function?
merry christmas
Are you using the php mail() function?
merry christmas
yes. i used mail() function.
Can you show us the code you're using please?
Thanks :)
p.s. i mean the code you use to send the email
i.e.
<?php
mail(...)
?>
you can simply send a mail without having to install any server on php .. i am using mail() function to send mails from PHP and never installed a server on it.. come on ..
here is a simple example from php.net
[PHP]
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('caffinated@example.com', 'My Subject', $message);
?>
[/PHP]
cheers !!
you can simply send a mail without having to install any server on php .. i am using mail() function to send mails from PHP and never installed a server on it.. come on ..
here is a simple example from php.net
[PHP]
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('caffinated@example.com', 'My Subject', $message);
?>
[/PHP]
cheers !!
That's what i was going to see if he was using...
Why would you install a mail server when PHP has one built in?
- markus.
here is the code guys....it is pretty the same thing, but it never sends emails:
$sendto=$_POST[department];
$sendto.="@yahoo.com";
$msg=trim($_POST[msg]);
$sender=trim($_POST[email]);
$name=trim($_POST[name]);
$msg.="\r\r\r$name";
$sendmsg=@mail($sendto,'Site Visitor',$msg,'From: $sender');
if(!$sendmsg) {
echo "Dearest $name,<br><br>There was an error sending your email. Please send email to <a href=\"mailto:webmaster@anberbeb.com?subject=Error Seding Email\">webmaster</a> to notify us about the accurance of this problem.";
}
else {
echo "Dearest $name,<br><br>Thank you for your email. You will be contacted shortly by an Authorized personel from Anberbeb Share Comapny.<br><br>Greetings,<br>Anberbeb Share Company";
}
}
i expected the installation of a mail server would solve the problem...but no.
Hi,
If you are using Windows XP or Windows 2003 you will need to install SMTP service, however if you set you ip address as 127.0.0.1 or localhost, Hotmail,Yahoo and Gmail will reject your email that is sent out from your pc
You will find your rejected mail in
C:\Inetpub\mailroot\Badmail
Subject: Delivery Status Notification (Failure)
This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail program.
--9B095B5ADSN=_01C8439CD875BFE200000007suv00111
Content-Type: text/plain; charset=unicode-1-1-utf-7
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
xxx@hotmail.com
--9B095B5ADSN=_01C8439CD875BFE200000007suv00111
Content-Type: message/delivery-status
Reporting-MTA: dns;xx00111
Received-From-MTA: dns;suv00111
Arrival-Date: Fri, 28 Dec 2007 18:50:58 +1200
Final-Recipient: rfc822;xx@hotmail.com
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;550 DY-001 Mail rejected by Windows Live Hotmail for policy reasons. We generally do not accept email from dynamic IP's as they are not typically used to deliver unauthenticated SMTP e-mail to an Internet mail server. http://www.spamhaus.org maintains lists of dynamic and residential IP addresses. If you are not an email/network admin please contact your E-mail/Internet Service Provider for help. Email/network admins, please visit http://postmaster.live.com for email delivery information and support
Sign in to post your reply or Sign up for a free account.
Similar topics
by: EBG |
last post by:
I'm an HTML novice and have a "mail to" form on my site where users fill in
info and send it to the email address I specify.
After looking into it, it's obvious this isn't the way to go, as most...
|
by: Chris Dewin |
last post by:
Hi. I've been thinking about using smtplib to run a mailing list from my website.
s = smtplib.SMTP("server")
s.sendmail(fromaddress, toaddresess, msg)
I know that in this instance, the...
|
by: JMCN |
last post by:
object invalid or no longer set - confusion of the recordset in access
2003.
i am currently converting from access 97 to access 2003. majority of
the codes converted over perfectly fine, though...
|
by: DanB |
last post by:
When I try to send email using the System.Web.Mail namespace
I get an exception of
Could not Create CDO.message object.
FYI - I worked for a long time with a similar exception of
"Could not...
|
by: joelagnel |
last post by:
hi friends,
i've been having this confusion for about a year, i want to know the
exact difference between text and binary files.
using the fwrite function in c, i wrote 2 bytes of integers in...
|
by: Richard Lewis Haggard |
last post by:
I'm having a problem with what appears to be some sort of confusion with
references. I have a single solution with a dozen projects which has been
working quite nicely for a while. The references...
|
by: Ed Bitzer |
last post by:
Would like to use this namespace but Visual Studio.Net 2003 cannot
locate and I do not see it listed under Project | Add Reference. Was
this not included this older version of VB.Net or Visual...
|
by: cybervigilante |
last post by:
I sent HTML formatted email, using PHP, to my Yahoo address from my
server, and it came out fine, styles and all. I sent it to my gmail
address to test it and all I see is the raw html code. But I...
|
by: Twayne |
last post by:
Hi,
I can't get the following code snippet to stop throwing errors except to
modify it exactly as shown here by adding the single quote to the end of
the first line and commenting out all but...
|
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,...
|
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$) {
}
...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
| |