Help with imap_mail()

Started on the old forum in August 2011 · view the original in the archive · old links redirect here

5 replies · 1,104 views · started 15 years ago · 1 min read

5 participants
Mysterio Lead · 630 posts #1

Hello guys,

I am trying to send mass emails using imap_mail() I put all emails in BCC and it works fine.

Problem is, emails are not trated as HTML emails. I am using

Content-type: text/html; charset=iso-8859-1

Isnt this enough?

Thanks!

mysterio.al - programming is a functional art

pichiriche Junior · 38 posts #2

use headers brot

$to = "for@domain.com $from = "@youdomain.com; $subject = "Hello! This is HTML email";

//begin of HTML message 
//begin of HTML message 
$message = <<<EOF 
<html> <body> HERE YOU CONTENT </body> </html> EOF; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n";
// now lets send the email. 
imap_mail($to, $subject, $message, $headers);
Mysterio Lead · 630 posts #3

Thank you but this does not work. Any other suggestion?

mysterio.al - programming is a functional art

arnage Lead · 811 posts #4

Only to try with mime.

$headers = 'MIME-Version: 1.0'."\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
shakil420 Developer · 125 posts #6

Mysterio3 @ how can i set up imap in my host? i want to start my own email system. with my own domain like username@mydomain.com do u help me

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close