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

email using PEAR

I am running Red Hat 8.0 and have pear enabled in PHP. I have installed
the Socket.php in the PEAR Net/ directory. When I run this test script
It displays the "Mail has been sent message" but no mail arrives in my box.

It was suggested by a friend that using PEAR was easier than setting up
sendmail on my box.

Any suggestions would be greatly appreciated.

David

<?php
include("Mail.php");

$recipients = "da*********@sympatico.ca";

$headers["From"] = "my*******@host.com";
$headers["To"] = "my*******@host.com";
$headers["Subject"] = "Test message";

$body = "TEST MESSAGE!!!";

$params["host"] = "smtp.server";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "user";
$params["password"] = "password";

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);

$mail_object->send($recipients, $headers, $body);

echo "Mail has been sent!!\n";

?>
Jul 17 '05 #1
0 1402

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

Similar topics

4
by: philphanluvr | last post by:
How do I sent content of a PHP form via HTML email? For example, fields $name, $city, $state, $phone, $location to HTML: <p>Congratulations $name from $city, $state with the phone # $phone ....
1
by: DJ Majestik | last post by:
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to setup my directory structure correctly. If someone could weigh in and see if I have this setup "right", I would appreciate it....
5
by: Jim Michaels | last post by:
I downloaded a PEAR module, but it came with this XML file and a PHP file. I figure I just include the PHP file somehow, but what do I do with the XML file?
6
by: monomaniac21 | last post by:
hi all how can u send a plain text version of an email with the html so that the users mail client can access this plain text version? kind regards marc
1
by: IchBin | last post by:
I remember having problems with pear when I first installed it but got it running some time ago. This is on a windoze XP SP OS. I did not think it was correct because it pointed to...
1
by: akuva | last post by:
I have to send more than 100s of email using a php code if i use mail function whether it will be sent to spam or inbox. If it is sent to spam which is the other way to send mass email from php. i...
21
by: Dev | last post by:
Dear All, I have created a website. in the contact us page i want to send all information (Entered by visitor in text boxex) directly to my e-mail address. to do this i have no idea because i am...
9
by: pavanponnapalli | last post by:
hi, i have data as under. 127.0.0.1 - - "GET /favicon.ico HTTP/1.1" 404 292 127.0.0.1 - - "GET /favicon.ico HTTP/1.1" 404 292 127.0.0.1 - - "GET /pear/symfony/ HTTP/1.1" 404 294...
2
by: Erik Witkop | last post by:
So I have been trying to get this to work all day. I can't get a local file on my web server to attach to an email. Right now I have it printing out in the body of the email. Please help me with...
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: 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: 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
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?
1
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...
0
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...
0
marktang
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,...
0
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...

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.