Hi...
is there a solution to chance the email format from HTML to (pure) TEXT?
Thanks For Your Help.
is there a solution to chance the email format from HTML to (pure) TEXT?
Thanks For Your Help.
Hi EPS,
Yes, but you need to hack the code. In chronocontact.php look for this code near the end line 438 in my version
The overrides ChronoForms assumption that it will send html emails and setting $mode = false tell it to send a plain text email, if you don't do this then it will continue to send html emails.
Note: Not tested and the === comparison may be too sensitive, try == if you get odd results.
Bob
Yes, but you need to hack the code. In chronocontact.php look for this code near the end line 438 in my version
/**
* Send the email(s)
*/
$email_sent = mosMail($from, $fromname, $recipient, $subject, $html_message, true, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name);
add one line and change 'true' to $modeif ( !($mode === false ) { $mode = true };
$email_sent = mosMail($from, $fromname, $recipient, $subject, $html_message, $mode, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name);
Now you'll need to include <?php $mode = true; ?>
in the OnSubmit before email field.
The overrides ChronoForms assumption that it will send html emails and setting $mode = false tell it to send a plain text email, if you don't do this then it will continue to send html emails.
Note: Not tested and the === comparison may be too sensitive, try == if you get odd results.
Bob
i have all done like you tell me.
now i opening the form i get this:
Parse error: syntax error, unexpected '{' in ...htdocs/members/components/com_chronocontact/chronocontact.php on line 461
Line 461: if ( !($mode == false ) { $mode = true };
$email_sent = mosMail($from, $fromname, $recipient, $subject, $html_message, $mode, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name); [file name=chronocontact-68c1e199816e8939d8c536768d9bcbf0.zip size=4954]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-68c1e199816e8939d8c536768d9bcbf0.zip[/file]<br><br>Post edited by: EPS, at: 2007/11/21 13:28
now i opening the form i get this:
Parse error: syntax error, unexpected '{' in ...htdocs/members/components/com_chronocontact/chronocontact.php on line 461
Line 461: if ( !($mode == false ) { $mode = true };
$email_sent = mosMail($from, $fromname, $recipient, $subject, $html_message, $mode, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name); [file name=chronocontact-68c1e199816e8939d8c536768d9bcbf0.zip size=4954]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-68c1e199816e8939d8c536768d9bcbf0.zip[/file]<br><br>Post edited by: EPS, at: 2007/11/21 13:28
Hi EPS,
Sorry, I missed a ')' in there - should be:
Sorry, I missed a ')' in there - should be:
if ( !($mode == false ) ) { $mode = true };
Bob
hmm... am i stupid?
still got: Parse error: syntax error, unexpected '}' in ../htdocs/members/components/com_chronocontact/chronocontact.php on line 461
here's the: chronocontact.php
[file name=chronocontact-9fe0c3153e3f4c567da2c444a8ff40d3.zip size=4953]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-9fe0c3153e3f4c567da2c444a8ff40d3.zip[/file]
well i have a second wish: please include a switch for a) HTML b) TEXT-Mail Format :-)<br><br>Post edited by: EPS, at: 2007/11/21 14:09
still got: Parse error: syntax error, unexpected '}' in ../htdocs/members/components/com_chronocontact/chronocontact.php on line 461
here's the: chronocontact.php
[file name=chronocontact-9fe0c3153e3f4c567da2c444a8ff40d3.zip size=4953]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-9fe0c3153e3f4c567da2c444a8ff40d3.zip[/file]
well i have a second wish: please include a switch for a) HTML b) TEXT-Mail Format :-)<br><br>Post edited by: EPS, at: 2007/11/21 14:09
Hi EPS,
No not you, me - I missed a *** ; as well!!!
PS Memo to self - don't try to write code straight into emails!<br><br>Post edited by: GreyHead, at: 2007/11/21 15:16
No not you, me - I missed a *** ; as well!!!
if ( !($mode == false ) ) { $mode = true; };
Bob
PS Memo to self - don't try to write code straight into emails!<br><br>Post edited by: GreyHead, at: 2007/11/21 15:16
ok, now it works.
ähm... no it works not.
the mail is still a HTML-Mail
(a HTML File in attachement)
i want a plain text email, without attachement :-)
ähm... no it works not.
the mail is still a HTML-Mail
(a HTML File in attachement)
i want a plain text email, without attachement :-)
Hi EPS,
after applying all Bob's steps, please find this piece of code and cooment/delete it :
Cheers
Max
after applying all Bob's steps, please find this piece of code and cooment/delete it :
$html_message = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title></title>
<base href=\"$mosConfig_live_site/\" />
<style type=\"text/css\">
".strip_tags( $chronocontact_params->get('newsletter_css'))."
</style>
</head>
<body>$html_message</body></html>";
Cheers
Max
Good Morning.
Thank for all yours trouble :-)
But it still don't work.
[file name=chronocontact-afb6049dbb19f3a141441a0ab17a1d96.zip size=4774]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-afb6049dbb19f3a141441a0ab17a1d96.zip[/file]<br><br>Post edited by: EPS, at: 2007/11/22 10:55
Thank for all yours trouble :-)
But it still don't work.
[...]
X-Mailer: PHPMailer [version 1.73]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="iso-8859-1"
X-RZG-CLASS-ID: cg00
[file name=chronocontact-afb6049dbb19f3a141441a0ab17a1d96.zip size=4774]http://www.chronoengine.com/components/com_fireboard/uploaded/files/chronocontact-afb6049dbb19f3a141441a0ab17a1d96.zip[/file]<br><br>Post edited by: EPS, at: 2007/11/22 10:55
And the Message.HTML [file name=Message.zip size=454]http://www.chronoengine.com/components/com_fireboard/uploaded/files/Message.zip[/file]
try to use the template option after making all the hacks above ?
Hi, No, I mean you set the email type to "template" and not "fields", make your template pure text of course, this works ?
oh i have overead that.
now it's done and i received a empty (HTML) mail.
looks like this: [file name=Message-c412194e532c4b919fb1f645e5ec741d.zip size=160]http://www.chronoengine.com/components/com_fireboard/uploaded/files/Message-c412194e532c4b919fb1f645e5ec741d.zip[/file]<br><br>Post edited by: EPS, at: 2007/11/23 10:18
now it's done and i received a empty (HTML) mail.
looks like this: [file name=Message-c412194e532c4b919fb1f645e5ec741d.zip size=160]http://www.chronoengine.com/components/com_fireboard/uploaded/files/Message-c412194e532c4b919fb1f645e5ec741d.zip[/file]<br><br>Post edited by: EPS, at: 2007/11/23 10:18
Hi EPS,
This will need some investigations, I will look into it and maybe include a new option for the email type at the next release!
Cheers
Max
This will need some investigations, I will look into it and maybe include a new option for the email type at the next release!
Cheers
Max
This topic is locked and no more replies can be posted.