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(localhos t). 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 2170 Markus 6,050
Recognized Expert Expert
Are you using the php mail() function?
merry christmas
Are you using the php mail() function?
merry christmas
yes. i used mail() function.
Markus 6,050
Recognized Expert Expert
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($messa ge, 70);
// Send
mail('caffinate d@example.com', 'My Subject', $message);
?>
[/PHP]
cheers !!
Markus 6,050
Recognized Expert Expert
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($messa ge, 70);
// Send
mail('caffinate d@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.="@yaho o.com";
$msg=trim($_POS T[msg]);
$sender=trim($_ POST[email]);
$name=trim($_PO ST[name]);
$msg.="\r\r\r$n ame";
$sendmsg=@mail( $sendto,'Site Visitor',$msg,' From: $sender');
if(!$sendmsg) {
echo "Dearest $name,<br><br>T here was an error sending your email. Please send email to <a href=\"mailto:w ebmaster@anberb eb.com?subject= Error Seding Email\">webmast er</a> to notify us about the accurance of this problem.";
}
else {
echo "Dearest $name,<br><br>T hank 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\mail root\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=_01 C8439CD875BFE20 0000007suv00111
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=_01 C8439CD875BFE20 0000007suv00111
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@hotma il.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.or g 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 of the
time the info doesn't even get to me.
Could someone just point me in the right direction please.....I've just read
about some software (Form let?) and other programs.......is this what I
should be looking at?
|
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 toaddresses variable can be a variable
of type list.
Suppose the list contains well over 100 emails. Would that create some
sort of drain on the mail server? Would I be better off doing it in some
|
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 my recordset did not.
i read from pasts posts that some references will not convert. so i
tried to change the dao 3.51 reference to dao 3.6 in access 97. then i
imported all of the objects into an access 2003. it did not work.
so my second...
|
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 create CDO.message object". I think I resolved that by
registering CDO.dll.
I am running VB.NET 2002, Framework 1.0 (Even though I have installed
|
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 binary
mode.
according to me, notepad opens files and each byte of the file
read, it converts that byte from ascii to its correct character and
displays
| |
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 between projects in the
solution were established through project references, not by browsing to an
assembly DLL. All of the projects are strongly named and use key files. Each
project's AssemblyInfo.cs specifies the assembly version, where the...
|
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 Studio? Is
there source code that I can download. I'm retired, VB.Net is a
hobby, and I would like to write a program to send a short weekly
message automatically (scheduled) to a dozen tennis players each week.
Found code snippets but all depend...
|
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 do get
formatted email in gmail, so I know people make it work somehow. I'm
looking right at a gmail message that I copied to Dreamweaver and it's
using Strong and Red text attributes that work in gmail. But mine
don't.
What do you do...
|
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 the first line:
-----------------
<?php <========= This is line 108 mentioned in the error msg
$mailuser="nodoby@spamcop.net";
$header="Return-Path: ".$mailuser." \r\n";
|
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,...
|
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: 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: 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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |