Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
inertia
Newbie
Newbie



Joined: May 19, 2008
Posts: 1

PostPosted: Wed Nov 12, 2008 7:58 pm Reply with quote

hi from me too!
I would like to ask for something quite different...
How can I add headers into the email I send? is there any extra parameters?

What I want to do is:
1)get sender email, sender name (optional), and tell the message via mailheaders to send it as a HTML email
2)also the email must be in a different charset that iso-8859-1, e.g. UTF-8 or iso-8869-2, etc...

Is there any possible way to achieve this goal?

Thanx in advance, wait for any response!
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Nov 14, 2008 7:47 am Reply with quote

Ok, to send as HTML, you can pass a parameter into the $params variable, such as:

$params = array('html' => '1');

Unfortunately, I do not have support yet for passing a different character set. But, if all your emails are needing this different character set, you could try modifying the tnml_fMailer function in includes/tegonuke/mailer/mailer.php script.

You could try modifying this line here:

Code:

   $message =& new Swift_Message($subject, $body, (isset($params['html']) and $params['html'] == 1) ? 'text/html' : 'text/plain');


To something like this:
Code:

   $message =& new Swift_Message($subject, $body, (isset($params['html']) and $params['html'] == 1) ? 'text/html' : 'text/plain', null, 'utf-8');


Do you see the two additional nodes being passed in the function all?

I do have it in the roadmap for this mailer to allow more configurability. Just haven't found the time.
 
View user's profile Send private message Visit poster's website
pauldoffer
Newbie
Newbie



Joined: Apr 10, 2012
Posts: 6

PostPosted: Tue Aug 13, 2013 3:58 pm Reply with quote

montego wrote:

You could try modifying this line here:

Code:

   $message =& new Swift_Message($subject, $body, (isset($params['html']) and $params['html'] == 1) ? 'text/html' : 'text/plain');


To something like this:
Code:

   $message =& new Swift_Message($subject, $body, (isset($params['html']) and $params['html'] == 1) ? 'text/html' : 'text/plain', null, 'utf-8');


works Good.. I use windows-1256 and now I see good text... great work
 
View user's profile Send private message
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Sun Aug 18, 2013 5:46 am Reply with quote

I guess pauldoffer has an old version because I can't find those lines.

Very Happy
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Aug 18, 2013 1:20 pm Reply with quote

I would definitely make sure you have the latest... the latest version is what was also released as a part of RN 2.5 I believe.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunchlinear-bunch
linear-bunch