473,405 Members | 2,310 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,405 software developers and data experts.

PHPMailer AltBody variable

Hello guys,

I'm trying to create a script. When the script finished it sends
notifications to users.
I'm using phpmailer obviously to send the mails. I have an html
version as well as a plain text version for clients that doesn't
support html emails.
How can I test the plain text version?

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host = $SMTP_HOST;
$mail->Port = 25;

// Prepare the email.
$mail->FromName = $from_name;
$mail->From = $from_email;
$mail->AddAddress($recip_email)
$mail->Subject = $subject;
$mail->Body = $html_body;
$mail->AltBody = $text_body;

When I try to set up outlook to read all standard mail in plain text
it takes my html version and transform it.

Thanks mates!

Aug 30 '07 #1
3 13333
NC
On Aug 30, 8:30 am, FadĄ <fad...@gmail.comwrote:
>
I'm trying to create a script. When the script finished it sends
notifications to users.
I'm using phpmailer obviously to send the mails. I have an html
version as well as a plain text version for clients that doesn't
support html emails.
How can I test the plain text version?
By actually using an e-mail client that doesn't support HTML e-mail.

Cheers,
NC

Aug 30 '07 #2
On Thu, 30 Aug 2007 18:18:55 +0200, NC <nc@iname.comwrote:
On Aug 30, 8:30 am, FadĄ <fad...@gmail.comwrote:
>>
I'm trying to create a script. When the script finished it sends
notifications to users.
I'm using phpmailer obviously to send the mails. I have an html
version as well as a plain text version for clients that doesn't
support html emails.
How can I test the plain text version?

By actually using an e-mail client that doesn't support HTML e-mail.
Or an emailclient that is configurable to prefer the text-variant....
Opera can, I think Thunderbird can too.
--
Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
Aug 30 '07 #3
Thanks guys!

I'm going to try Opera!

Aug 30 '07 #4

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

Similar topics

3
by: Kevin | last post by:
Does anyone know if it is possible to configure PHPMailer so that instead of actually sending the message it writes its contents out to a file (i.e., including all the message headers, boundaries,...
2
by: starman7 | last post by:
i'm using phpmailer, the variable that makes up the html body contains other variables. when one of these other variables contains more than 980 characters, it stops rendering. any ideas on what...
1
by: Leszek | last post by:
Hi. I have problem with phpMailer 1.73 (windows version) After copying both class.phpmailer and class.smtp and also language file phpmailer.lang-pl to my php include directory im getting this...
2
by: prasenjit2007 | last post by:
Hello, can u help me sending Email with attachments using the Class phpMailer. On the website I have a link to an html form in which I input the parameters with the names 1)from(textbox name)...
9
by: Lucanos | last post by:
Hi All, I am currently using PHPMailer to send out a set of emails on the execution of a PHP Script (obviously). My problem is that the PHPMailer action is returning a "true" result each time...
2
by: mrbadboy | last post by:
Hi, I tried to send a mail with PHPMail class. Its sending properly if i write the attachment file name directly( I have mentioned my code bellow) $mail = new PHPMailer(); $mail->IsSMTP();...
7
dlite922
by: dlite922 | last post by:
I can't seem to get it working with my smtp server. I can send the email through the command line like so: 220 localhost.localdomain ESMTP Sendmail 8.13.8/8.13.8; Wed, 6 Aug 2008 18:44:29...
2
mikek12004
by: mikek12004 | last post by:
Before posting here I google it and saw ablut 30 pages for a solution so I pretty much excluded the obvious things. The code is <?php //now to send the mails to seller...
5
vivekgs2007
by: vivekgs2007 | last post by:
HI to all, I downloaded the Php Mailer Function, I embedded it to my Feedback page, It is not giving any error, But the mail is not going, I don't no where i gone wrong...Please help me...
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: 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
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...
0
agi2029
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,...
0
isladogs
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...

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.