XPertMailer Home Page
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error: invalid content type on MAIL5->html()

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XPertMailer Forum Index -> Help
View previous topic :: View next topic  
Author Message
carlo



Joined: 21 Aug 2009
Posts: 2

PostPosted: Fri Aug 21, 2009 8:56 am    Post subject: Error: invalid content type on MAIL5->html() Reply with quote

Hello,

I am trying to use XPM4 for the first time now for sending HTML messages, but I keep getting one error while executing the script:

Code:
Error: invalid content type on MAIL5->html()


I can't understand what is causing this error, especially because it doesn't provide much additional information. Here is the script I'm using:

Code:
$m = new MAIL;
$m->From($from,$fromname);
$m->AddTo($to);
$m->AddCc($cc,$ccname);
$m->Subject($subject);
$m->Priority(3);
$m->Html(include "emails/".$_POST['document']);
$m->Send('sendmail');


Could it be the include-statement that doesn't work like this? At the error I see a blank page with the email followed by the error... Confused
And if I cannot use the include statement as I do now, how could I include a template without having to write the code for each individual e-mail?

Thank you in advance!
_________________
XPertMailer - Advanced Mail Engine
Back to top
View user's profile Send private message Visit poster's website
carlo



Joined: 21 Aug 2009
Posts: 2

PostPosted: Fri Aug 21, 2009 9:09 am    Post subject: Reply with quote

Solved!
Code:

$contents = file_get_contents('emails/' . $_POST['document']);
$m->Html($contents);

That did the trick. Smile
Well, hope it will help some other user Wink
_________________
XPertMailer - Advanced Mail Engine
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XPertMailer Forum Index -> Help All times are GMT
Page 1 of 1

 
Jump to:  
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, 2005 phpBB Group