The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with a HTML Email header in PHP
I am trying to make my forum have the ability to send out HTML email through the control panel to my users. So I am working on the admin/email.php and the email sends great, with HTML working and all but the from address gets all discombobulated.
Here is the code I am adding Code:
// joor added for html email $headers = "From: $from \r\n"; $headers .= "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1"; $sendmessage = stripslashes($sendmessage); // end if (!$test) { echo "sending ... \n"; // vbmail($user['email'], $subject, $sendmessage, $from); // joor edited for html email vbmail($user['email'], $subject, $sendmessage, $headers); // end Code:
"From: webmaster@rcfiles.com@secure.rcfiles.com" |
#2
|
|||
|
|||
If I remember correctly the concatenation of that string occurs in the vbmail function. You could prolly modify it slightly to create an htmlvbmail function to transmit the headers as you wish. It's in forums/admin/functions.php.
|
#3
|
|||
|
|||
Oh my, that is why, I don't know what I was thinking. Thank you.
|
#4
|
|||
|
|||
Glad to help. Good Luck.
|
#5
|
||||
|
||||
HI. I am sorry to bother you, but I would love to be able to send html through the CPanel. Could you please tell me the steps to do this? Thanks bunches!
|
#6
|
|||
|
|||
in admin/email.php
search PHP Code:
PHP Code:
|
#7
|
||||
|
||||
Thank you sooooooooooo much!
I am only having a problem with one section. It doesn't want to read the vb code. It just prints it as text, like this: Quote:
|
#8
|
|||
|
|||
theres a problem, because if your user do not have permision to post html ... the post is written in your DB in html code....
I have this problem and i dont know how fix it.. Sorry about my english.. (Spanish 4 me) |
#9
|
||||
|
||||
Hi. I am sorry, I don't understand. If you don't mind replying in Spanish I have a friend who can interpret for me.
** Lo siento, pero no entiendo. Si te respondes en espanol, mi novio podre traducir por mi... |
#10
|
|||
|
|||
(Spanish Reply)
El problema es que poniendo ese código el vbcode se transforma en html al momento de ingresar los datos a la base de datos, por lo tanto cuando un usuario que no tiene acceso a escribir posts con html hace un post el foro automáticamente transforma todo su mensaje a código html y el mensaje queda con todos códigos html como por ejemplo: Hola<br /> como <b>andás</b><br /> En los e-mails llega con formato html, pero en el foro queda todo mal. Por lo que yo decidí que los mails sigan llegando con el vbcode sin interpretar dado que no sé como hacer para que el traspaso de vbcode a html se haga al momento de enviar el e-mail y NO al momento de ingresar los datos a la base de datos. Espero que no tengas problemas para traducirlo. Saludos dese Argentina |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|