I'm using this code: -
<?php
-
require_once "Mail.php";
-
-
$from ="__MUNGED__";
-
$to = "__MUNGED__";
-
$subject = "Hi!";
-
$body = "Hi,\n\nHow are you?";
-
-
$host = "__MUNGED__";
-
$username = "pedjasmek";
-
$password = "********";
-
-
$headers = array ('From' => $from,
-
'To' => $to,
-
'Subject' => $subject);
-
$smtp = Mail::factory('smtp',
-
array ('host' => $host,
-
'auth' => true,
-
'username' => $username,
-
'password' => $password));
-
-
$mail = $smtp->send($to, $headers, $body);
-
-
if (PEAR::isError($mail)) {
-
print "<p>" . "Message sent". "</p>";
-
} else {
-
print"<p>Message successfully sent!</p>";
-
}
-
?>
-
and it won't work.Neither the first or the second message appears.
1 1439 Sign in to post your reply or Sign up for a free account.
Similar topics |
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 .
You now get an expense paid trip to $location .
And that HTML outputted in email..so someone checks their email,they
|
by: Domin |
last post by:
Hi
Is there possible to send e-mail from simple form when the server doesn't
have a domain name, and in the internet only can be seen using it IP address
? The mail() function will work correctly ?
And if not what would you suggest ?
Regards
Domin
|
by: james |
last post by:
How can I have a php script send data to a URL as form post data from
within the script without creating an actual form in a web page.
I am working with an affiliate program (from Affiliateshop) and the
instructions are 'have your script send a form post with the name of the
form fields "AID" and "BID" and their values to the following URL string...'
Thanks
james
|
by: Markus Schuster |
last post by:
Hi,
i'm searching a php script which is able to send mails.
It should be able to tune the font size and write a text bold.
Any idears?
Thanks,
Max
|
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 have tried
to sent email to 4 to 5 email ids it is going for inbox only but i
have a doubt if i send it to more than 100 email id it may go for spam
| |
by: chathura86 |
last post by:
hi
im using php5, exchange server 2007, and pear Mail and pear mail_mime packeges to send mails.
it works fine with-in my domain.but i cannot send mails to addresses which are out side my domain through PHP.
but i can send mails using outlook 2003
i get the following error
|
by: undbund |
last post by:
Hi I am creating a newsletter system. The software should run from
desktop computer (localhost) but be able to send email to anyone on
the internet. Can you guys give me some ideas on how to achieve this.
Thanks
|
by: r_ahimsa_m |
last post by:
Hello,
I am learning PHP5 and www technologies.
I would like to send email from .php script. The email will contain HTML
with images (BMP, GIF, JPEG) and movies (MPEG) included.
I have a question: how can I include images and movies (which tags should I
use?).
Can I do it using mail() function? I would prefer mail() than PEAR because I
am not sure if I will have PEAR on server.
|
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 any
thouhgts on how to get it in as an attachment.
CODE:
<?php
ini_set(SMTP, "172.18.1.65");
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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: 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: 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...
| |