Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Error In Sending Html Page With Attachment In Mail


i am sending a mail with attachment. the text mail with attachment is going in rght way ...but when i try to send a HTML Mail(text coming from a HTML Editor) with attachment the mail .. i got some kind of error ... the mail and attachment goes .. but the problem is the HTml page display as its is ...like its display as source code whatever a typed in editor..




View Complete Forum Thread with Replies

Related Forum Messages:
Sending An Attachment With Mail()
I have been trying for a while to send an attachment with the PHP mail function. The problem is that the body of the message is always the contents of the attachment. For example, I have a text file whose contents is the line: "12345".

I attach this message using my mail function and have the body of the mail as "Hello there". When I receive the text file and open it, the contents read "Hello there" instead of "12345". My mail function generates the following information: Code:

View Replies !
Sending Attachment With Mail()
How can i simply attach an file (word.doc) to an e-mail with the mail()
function



View Replies !
Sending Attachment Using Mail()
<?php
$header .= "From: ".$email."";
$mailresult  = mail($to,$subject,$msgtxt, $header); ?>

How can I add a PDF attachment to the above?

View Replies !
Sending Mail With An Attachment
I know how to send a file as an attachment when the file is in my file system. Now I want to send data as attachment without saving it to the filesystem first. Under UNIX shell what I do is uuencode and dump the output at the end of the 'data' part of the message. How can I convert the string to an attachment without the mediation of
the filesystem.

View Replies !
Sending Attachment Form Local Drive With Mail()
With them help of newsgroups I created a form that makes it possible to sent
an email with an attachement thats on the internet.. How can i attache a
file thats on the users hard drive? ....

View Replies !
Html/PHP Mail Attachment
I've managed to put bit's and pieces of code together to create an online email form with attachment.

When I click on send the email gets sent and my email client doesn't tagg it as a spam, which is good, BUT the attached file size is 0.0 Kb. The name of the attached file is correct and the format, but it's empty. Code:

View Replies !
Sending Mail: Choice Between Sending Receipt, Or HTML Formatting
I'm using PHP's mail function to send out a message via email.

I would like for this email message to send a receipt when read as well as send an HTML formatted email. Both aspects are important to me.

I know this is a product of the mail header. This is the format I currently have:

mail(to, subject, body, "From: name <email>
Disposition-Notification-To: name<email>
Content-type:text/html;charset=utf-8");

This prompts the email program to send a reciept, but the email message is not in the HTML format, and even contains "Content-type:text/html;charset=utf-8" at the top of the body.

If I switch the order to this format:

mail(to, subject, body, "From: name <email>
Content-type:text/html;charset=utf-8
Disposition-Notification-To: name<email>");

This sends the email with HTML formatting but does not prompt the sending of the receipt. I also get "Disposition-Notification-To: name<email>" at the top of the email message.

This tells me there is a problem in the transition between the headers, which currently is "".

What am I doing wrong?

View Replies !
Sending HTML Mail To Outlook Express With Mail()
I'm sending out an HTML mailer using the mail() function in PHP. I'm appending all of the headers to the message. This message displays correctly in Hotmail, Outlook 2000, and even Mac's OSX mail client. But, for some reason, Outlook Expess (on Win XP & OSX) displays the HTML code and doesn't render it.

If, however, the recipient copies the HTML code and composes a new HTML message in Outlook Express, it gets sent correctly.

This particular user is also getting other HTML mailers that display correctly, so I know that the client is capable of accepting HTML mail.

I'm led to believe that PHP's mail() headers are not being interpreted correctly. In fact, they appear as the first 3 lines in the body of the message when viewed in Outlook Express. OK, here are some samples to tie this all together: First, the mail() code I'm using: PHP Code:

View Replies !
Sending Html Via Mail
I want to send mail that is formatted as nicely as possible.
For this, I plan to send raw html code URL...but the mail prints out the html also...how do i make the html formatting show ?? I guess I'll have to add some specific header...is it true ??

View Replies !
Sending Html Mail?
I made a .html file taht I want to send by mail, but not as a attatchment. I want it to be sendt as a html mail.

I could use microsoft word and send it trough there, but word will change some of the html code.

View Replies !
Sending HTML Mail Using PHP
I know how to send plain text e-mail using PHP's mail() function, but how to send HTML e-mails using mail() function.

View Replies !
Sending Html Mail
A client wants to send out a mail in html including graphics. The idea
is that it looks like a personalised coupon that they can print off.
I've had a look at http://phpmailer.sourceforge.net/ and the html
example seems pretty straightforward but it doesn't give much
information on the graphics. Should the images be sent as attachments
and simply referenced in the html or am I completely off track here?
--

View Replies !
Html Mail Sending
I tried to send emails in html format in this line : PHP Code:

View Replies !
Sending HTML Mail()'s
I have a problem when sending HTML mail (using css). The mails just incluse all the HTML tags... So can you send both text and HTML so that the server receiving can use the text mail if HTML mail is not supported?

Or is it always best only to use plain text as I understand is advised? - it is the first time Ill use the mail() function.

View Replies !
Sending HTML Email With Mail();
i have set up this script from other scripts but sometime it does not send any email and other times it does
with this im not shure why,i have edited other mail scripts and finaly come up with this which when it works works well.
there are two identicle mail functions there the first sends a email to the user saying thanks for registering the second sends a email to 4 admins telling them about the new user.

can you pick out why it,s not working?

View Replies !
Sending HTML Using The Mail() Function
Im trying to send html via mail() but its not outputing the html. Is there something I need to alter in php.ini Code:

View Replies !
Sending Mail In HTML Format
I am sending mail through PHP but the HTML tags are not working, Code:

View Replies !
Error When Sending Mail
I am in an internal network that is using our company's SMTP. I am working on a forgot password page for our website.  When I type in an email and submit it it verifies that the email is in the database and sends that email account the username and password. 

This only works with the company's email accounts such as me@company.com but when I use me@yahoo.com it does not send the username and password. I receive these errors Code:

View Replies !
Error Sending An E-mail
i'm trying to send an email using regular mail function, well it doesn't work and i get this error: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:MYDOMAINwwwindex.php on line 19 irst: i don't have the SMTP info, should i get it from the provider or i can find out what is it.

View Replies !
Sending HTML Email Using The PHP Mail Function
I am encountering a very strange problem when sending HTML email using the PHP Mail Function. Each email that goes out has a "! " inserted into the body of the message... I have checked the body code and it is definitely not in there...

View Replies !
Sending A Html Document Using Mail() Function
I need to send the following code in an email...but its a mix of php and html, and it retrieves various values from a database before sending...oh and i wouldnt mind the sending of the mail to be done on a button click!...anyways i have messed and messed but i aint too sure whether it can be done! Can someone please tell me the code and where i need to place it within my code? Code:

View Replies !
Sending Php/html Document As An Email Using Php Mail() Function
I need to send the following code in an email ... but its a mix of php and html, and it retrieves various values from a database before sending...oh and i wouldnt mind the sending of the mail to be done on a button click!;)...anyways i have messed and messed but i aint too sure whether it can be done! Can someone please tell me the code and where i need to place it within my code? .....

View Replies !
Shows Html Code While Sending Mail Problem ??
I am using my mail function to send the mail, mail successfully goes but the problem is its shows all the html codes and also the name is blank in the from section (Note: I am using outlook express) Code:

View Replies !
Sending HTML Page
I have a website where people can "join the mailing list" by entering their email address from the home page. THe email address goes into a simple, 1-field db. The field is called "email" and I'd like to write a PHP script to call the entire group of emails, and allow my client to send out a mass email to her list.

In other words, maybe she edits the text on her HTML page with the latest "deals" and hits "send" and the script calls the emails fromn the db and, calls in the HTML page and out it goes.

I'd like to automate this as much as possible for this client so the PHP works in the background and she is able to keep things very simple on her part. If there is a thread that addresses this task, I'd be interested in seeing it. INitial searches didn't really turn up much.

View Replies !
Sendmail Form Sending HTML Page
i have a sendmail form that should send HTML pages to the email address that i specify
i tested it first sending to individual emails and it worked. unfortunately, when you try to view the HTML page that you send first, the color is different, the text is also different and the links are not clickable. Code:

View Replies !
Sending An Attachment That's A Variable
I want to get a dynamicaly created RTF document to somebody when a certain database field is changed. The RTF document isn't a real document, the contents are stored into a variable. Is it possible to use this variable as a basis for an attachment? Of course I can write it to a temporary file and attach that to my mail, but that's not what I call elegant.Next to that I'm not exactly proficient at using the mail() function with attachments, so don't hesitate to add that piece to any example code.

PS I prefer NOT to use the MIME classes, because I really don't understand those. They're supposed to ease things, but then again, I'm awfully blonde.

This entry also handles this subject, but doesn't seem to work.
Entry

I rewrote the code to PHP, but I get the same 'one break in front of RTF code' problem. Anyway, here's the code:

View Replies !
Sending Email With Attachment
does anybody know how to send mail with attachment using PHP?

View Replies !
Problem Sending Email Attachment
I have this script that attaches a file and sends it to an email address. It works fine.

The email arrives with the attachement as it should.

However, there is currently no text in the body of the email, just the attachment (and the subject).

If I try and add text into the body of the email, the attachment arrives screwed up.

How do I add text in the body of the email, something like

"Here is your attachment"

View Replies !
Setting Up MIME For Sending Attachment
Can anyone point me to a good tutorial about how to set up the correct mail headers to read base64 file data into an email attachment from php?

View Replies !
Problems Sending Email With An Attachment
I am wanting to send an email using PHP with an attachment, at the moment a simple text file will do. So after reading the numerous previous posts on this subject I have come up with the following code:

View Replies !
Sending Form Information And An Attachment To My Email
Okay here is my deal. 4 to make my website. I made one page ask for user information and they attach a file. I need to know how to have the file and the info on the form to my email address! Can someone please help!?

View Replies !
Sending Flash Movies As Inline Attachment
I want to send inline flash movies as inline attachment. My researches pointed me to use phpMailer which eases the paing of sending mails easily. I can send inline images easily by using phpMailer.

Although it is written in PHPMailer Tutorial that "....you want to send out a HTML-message with pictures, or even flash animationsor whatever, PHPMailer supports this as well. ", I could not find a working example for sending flash as inline attachement.

I have searched all the documentation coming with phpmailer, faq's and even google [+ this forum ] but could not find a similar topic. I want to send flash movies as an inline attachement along with the mail, so that users can see flash even when they are offline, providing "http://www.domain.com/flash.swf" will not work for me. Code:

View Replies !
Generating PDF File And Sending As Email Attachment
We need to create a php page which generates dynamic content (a price quote) based on form entries, displays it on a web page, and simultaneously sends an email with the same content in a PDF file attachment. There are enough differences between the ideal web page and PDF layouts that I don't think the various HTML-2-PDF scripts are suitable. (Also there are a few pictures in the mix which complicatesthings). Our web server provider doesn't have and will not install PDFlib so I am looking at alternatives like EZPDF, which at first glance looks reasonable.

View Replies !
Html Mail() - Wrong Parameter Count Error
i have a form that sends a message to the user and i need to incorporate just one link into the body of the message. i've researched using classes, but i thought i could use the mail() function instead. however, i'm getting a wrong parameter count error when using this script. can anyone help steer me in the right direction? for all i know, i could be way off base w/ this one - can it be done? PHP Code:

View Replies !
Send Mail Using Mail() With Attachment
im trying to find out how to send an email with the mail() function and add an attachment

basically i want the user to be able to send an email and browse their computer and attach a word doc to the email any ideas on the attachment bit ?

View Replies !
Mail() With Attachment(s)
Can anyone point me to where I can find examples of sending email with attachments from php? I came across something last year and tried it out, but was not successful. I would like to be able to include an .xml file as an attachment as well, if that matters.

View Replies !
Mail() And Pdf Attachment
I am trying to send a pdf file as an attachment with the mail()
function. Unfortunately, the pdf file does not show up as an
attachment. I get its coding as text along with this:
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=&quot;==Multipart_Boundary _x893cd7b85e299baba9cd7ab91338 4411x&quot;
--==Multipart_Boundary_x893cd7 b85e299baba9cd7ab913384411x...

View Replies !
E-mail Attachment
Is there any way one might go about saving e-mail attachment from messages fetched via the IMAP functions in PHP?

View Replies !
Attachment To Mail
I want to be able to attach a file on the contact-us side ....

View Replies !
PHP Mail() With Attachment
I have a long application form for a modeling photographer.  It asks a few questions at a time, and then moves them on to the next section. 

The last section has them enter a photo.

What I want to do, is get the photo onto the server (done)

Send the photo to the owner in an email attachment with the rest of their info (got everything except the attachment part)

Then delete the photo (I know how to do this)

IF (mail($mailto1,$subject,$body, "FROM: $mailfrom
Reply-to: $mailfrom"))

That is the way I am sending the mail.  Of course above it all the parts are defined.  What needs to be added to this to have the image sent with it as an attachment. 

View Replies !
Mail Attachment (pdf)
I have some weird problems attaching dynamically generated pdf documents to an email. most people who receive the mail cannot open the attached pdf, though it is shown as one. there must be something wrong with the encoding i think, but i didnt find a solution. its weird, because if i send the mail to my adress, it works perfectly (tested with firefox as mail-client).... but not on my clients' accounts, the other way around would be better i am using fpdf to generate the pdfs.

PHP Code: .....

View Replies !
Using Mail Attachment
Im using phpmailer to send mail through smtp and I can attach an image like
$mail->AddAttachment("/tmp/image.jpg", "new.jpg");But how can I use that image in my email itself?

View Replies !
Problem With Mail Attachment
Can anyone enlighten me as to why I get this: Code: Message-Id: <E183ibR-0008Vu-00@blue.srv2.com>
Date: Mon, 21 Oct 2002 20:52:41 +0100
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - blue.srv2.com
X-AntiAbuse: Original Domain - ski-info-online.com
X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [99 99]
X-AntiAbuse: Sender Address Domain - blue.srv2.com

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=====7b74a59b31c591dd6764d734258a5c99====="

--=====7b74a59b31c591dd6764d734258a5c99=====
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Test Message

--=====7b74a59b31c591dd6764d734258a5c99=====
Content-Type: image/gif; name="1star.gif"
Content-Transfer-Encoding:base64
Content-Disposition: attachment; filename="1star.gif"

R0lGODlhCgAKALMAAAAAAO/GGL2cAP/WMf//Ss61If//Kf/3Ib2tCPfWGP//Wv///wAAAAAAAAAA AAAAACH5BAUUAAsALAAAAAAKAAoAAAQscMkFwLxgGCtrTZsHKIYBlooFCEFpHBwlIG9MIYKwTUCR VAICB/DrCGI2TgQAOw==
--=====7b74a59b31c591dd6764d734258a5c99=====-- When sending mail attachments. Here is my code: PHP Code:

View Replies !
Mail Attachment Security
I have created a script which attaches form uploaded files to an
email. What security is suggested to prevent attachments which may
contain viruses, etc. from being uploaded? I am running finfo_file()
to determine the mime-types of the files being uploaded, so it should
easy to exclude certain types of files based on this, or the file's
extension.

Also, I would like to send an alternative text with this email. Is
there a good script out there that removes HTML and converts to simple
formatted text?

View Replies !
Mail Attachment Questions...
I've found a script at these great Google fora. a script
to send emails with attachments.
The script is below this message, name etc. aren't mine, but from
the original post.

My questions are:
- Is this script extra heavy for a server, or should it be
no problem?
- How big do you advise for max size of attachments?
- Why is the attachment set in an array, when i remove the
array and only leave it's content-text i get a big time error.
- Why is this in there? --> $message .= str_replace ("=", "=3D",
$html_message)."
";
- In the source of the mail, there are a few THOUSAND lines of
the following text. Right after "Content-ID: <image.jpg>"
"Do1QlNSe3k6QmpmR0hJTERWWlVhh4EQABAgQDAggIBwoKBwgCA wABAgMA"
what is it for? Does it delay my server?

I'm sorry if this seems kind of lazy from me, but i'm a newb so i
don't
know how to figure it out else.

code from script below found at:
http://groups.google.nl/groups?hl=n...hello.at&rnum=3
__________________________________________________ ____________
<?php
function sendmail ($from_name, $from_email, $to_name, $to_email,
$subject, $text_message="", $html_message="", $attachment="")
{
$from = "$from_name <$from_email>";
$to = "$to_name <$to_email>";
$main_boundary = "----=_NextPart_".md5(rand());
$text_boundary = "----=_NextPart_".md5(rand());
$html_boundary = "----=_NextPart_".md5(rand());
$headers = "From: $from
";
$headers .= "Reply-To: $from
";
$headers .= "X-Mailer: The Bat! (v2.04.7) Personal
"; // say
we are
the bat mail client ;-)
$headers .= "MIME-Version: 1.0
";
$headers .= "Content-Type:
multipart/mixed;
boundary="$main_boundary"
";
$message = "
--$main_boundary
";
$message .= "Content-Type:
multipart/alternative;
boundary="$text_boundary"
";
$message .= "
--$text_boundary
";
$message .= "Content-Type: text/plain;
charset="ISO-8859-1"
";
$message .= "Content-Transfer-Encoding: 7bit

";
$message .= ($text_message!="")?"$text_message":"Text portion
of
HTML Email";
$message .= "
--$text_boundary

View Replies !
Multiple Mail Attachment
How do enable the people to attach more than one file? This is portion of my code but it enable only one file to be attach. May i know what's wrong with it? Code:

View Replies !
Mail Form With Attachment
im a beginner and need to modify a script, instead of the attachment being sent to the admin email i need it to be delivered back to the sender, Code:

View Replies !
Having Problems With Mail Attachment
I am looking for a way to get email attachments together with reply's from the server.
You fill in a webform and based upon that you recieve an email with a specific attachment in it.

I already found this script on this forum : Link

I tweaked it a little bit and came up with this:

Code:

View Replies !
Mail Attachment Parser
I've had a look at PHP Classes for a mail parser and there seems to be quite a few on there. Does anyone here recommend a particular reader? I want something really simple.  All I want to do is be able to save an image that's attached to an email. That's all.  I guess I'll need to connect to the mail server and retrieve the specific email (something I can already do with sockets) but just need to parse the attachment string.

View Replies !
Mail Attachment Problems
I am sending attachment with mails using PHP mail function. The mails are getting despatched to the intended receipents but the attachments are getting converted into a .tmp file. Also an additional .txt file is getting generated with the attachment.

My PHP version is 4.3.3

View Replies !
Mail Attachment Saving Function
here's a little function I threw together that can save attachments from messages retrieved via the IMAP library.

Note that the function takes two arguments, the first being the mailbox opened by imap_open(), and the second the message number of the message you want to retrieve the attachments/body from. note that the function dosn't check the validity of a message of $mnum actually existing, as in the code I wrote it for, the message number was checked for validity before calling the function. The function returns a string containing the body of the message, as well.

Oh yea, it also dosn't save attachments of type 0 (7-bit) and 5 (Other). still playing with that functionality.

View Replies !
Retrieving An Attachment From A Piped Mail
Here's the deal :

I get from a coworker some mails with a ZIP file attached. I've created an
email aliases that resends the mail to a program using the smrsh mechanism.
My problem is that I'd like to extract the ZIP file from the mail with
this prog, but I don't find out how to do this. read somthing about the
RFC 2054, but doesn't help much more...

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved