Hi Guys
Is there way to put a html code to make a body for mails sending " Registration" "Reset Password" etc... ???
Hi Rafail, there is no demo as i already posted full code here,
Note that this component will just add <div>any message </div>
that means you can change it or wrap message in your own html <div></div>
is just example.
ossn_com.xml file
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="http://www.opensource-socialnetwork.org/v/3.0">
<name>MyMailer</name>
<id>MyMailer</id>
<author>Core Team</author>
<description>My HTML mailer.</description>
<license>Open Source Social Network License (OSSN LICENSE)</license>
<author_url>https://www.softlab24.com/</author_url>
<license_url>http://www.opensource-socialnetwork.org/licence</license_url>
<version>5.0</version>
<requires>
<type>ossn_version</type>
<version>5.0</version>
</requires>
</component>
Try to reset password and see if the message you receive is html?
can you give me a demo?
I may be doing something wrong...
i am not sure what do you mean by T_string? there is no such a error for me, where did you get that error? on which line?
i can't do it i get error T_string is there any other way?
UPDATED
You can use html template, just for example you can see https://github.com/opensource-socialnetwork/SMTP that override current mailer just non-tested code:
ossncom.php file
<?php
function myhtmlmails() {
ossnaddhook('email', 'send:policy', 'myhtmlmailsdeny', 1);
ossnaddhook('email', 'send', 'myhtmlmailsextends', 1);
}
function myhtmlmails_extends($hook, $type, $mail, $return) {
$currentText = nl2br($mail->Body);
$mail->Body = "<div>{$currentText}</div>"; //here you can wrap message in your html template
$mail->isHTML(true);
$mail->Host = $settings->host;
$mail->Port = $settings->port;
$mail->Username = $settings->username;
$mail->Password = $settings->password;
return $mail->send();
}
function my_htmlmails_deny(){
return false;
}
ossn_register_callback('ossn', 'init', 'my_html_mails');
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)