How to edit the registration email sent by buddypress for activating users - buddypress

I have this message when users register on my site, this is an excerpt of what is sent to the user and the email header message was incomplete. Take a look at what is sent when a user register
Email Subject = "[WWW Sites] Activate \http://1/"
And the email body message reads as below
"Thanks for registering! To complete the activation of your account and blog, please click the following link:
http://www.com/activate/?key=8b9c059db8ae9a5b
After you activate, you can visit your blog here:
\http://1/
So it is this incomplete messages that I would want to edit.
Thanks for your anticipated response

You have go through the filter method used in Wordpress Because you can not changed the email text or subject directly from the file because the email are comming from Buddypress core file so you can use the filter method.
Please put below code in your theme functions.php file.
1.) Change the subject for Activation email put below code:
function change_activation_subject($subject) {
return __( "Change Activate Your Account Subject", 'buddypress' );
}
add_filter('bp_core_activation_signup_user_notification_subject', 'change_activation_subject');
2.) Change the email body for Activation email put below code:
function change_activation_email_body($message) {
return __( "Change Activate Email body", 'buddypress' );
}
add_filter('bp_core_activation_signup_user_notification_subject', 'change_activation_email_body');

Related

From attribute inside node mailer message not working always keep sending mail through default account which is used for creating account

let message={
from:email,
to:emails,
text:'Please join the meeting',
subject:`You are Invited for ${meetingName}`,
html:mail
}
Above is my message object the from attribute is not working. I want to send email from logged in user to the user given by him , but node mailer uses the email (my email which is configured at auth) it must use email given in from tag.
const config={
service:'gmail',
auth: {
user:"xx#gmail.com",
pass: ""
},
port:465,
host:'smtp.gmail.com'
}
always uses xx#gmail.com instead of logged in user

api Telegram webhook : how can delete new_chat_participant message

I created a bot via webhook method of api telegram and It's okay and working.
but I want know how can delete any new_chat_participant messages before sending message by members.
You know that telegram don't send request to your hook url until have not any message with members !!!!!!!
I need just message_id for example when a member add an another to supper group.
Set /setprivacy to disable in #BotFather to receive the whole actions and messages from your group. (In order to delete these messages, the bot must has access to messages in the group, needs to be administrator).
When new member has been added to group, you will receive a json in your webhook something like this:
{ update_id: 123123123,
message:
{ message_id: 2599, // Pay attention to this message id
from: {
...
},
chat: {
id: -987372183 // This is your group's id
...
},
date: 1582378239,
new_chat_participant: { // Field when new member is added to group
}
...
}
Now you need to send a post request to Telegram to delete this message (action). The request is:
request.post("https://api.telegram.org/botYOUR_BOT_TOKEN/deleteMessage?chat_id=GROUP_ID&message_id=MESSAGE_ID_RECEIVED", ... )
Hope this helps.

Smooch: How can I get the input from the user after he has entered something?

My bot is working again! BUT
I have a script asking the user for his name.
So I went through all topics on stack and the repos in github but somehow it never clicked.
My question is How can I get the input from the user after he has entered something - based on the scripts request?
(Would it involve postback or do I need to let smooch listen for messages or or or?
Thanks for any help!
Wouter
Using the smooch-bot library, in the receive callback of your script file, the second parameter is the user's message. You can use that message object to know what the user has said. You can see this in action in the smooch-bot-example repo:
askName: {
prompt: (bot) => bot.say('What\'s your name?'),
receive: (bot, message) => {
const name = message.text;
return bot.setProp('name', name)
.then(() => bot.say(`Great! I'll call you ${name} Is that OK? %[Yes](postback:yes) %[No](postback:no)`))
.then(() => 'finish');
}
}
You can use message.text, as in the example above, to get the reply to your question

How to send SMS on osclass user registration

I am a beginner.
I want to send a welcome SMS to a new user in osclass, adding the SMS API on each page.
If anybody knows where is the "Registration email send" I can integrate it there.
I have tried in utils.php but it's not working.
My Script is:
////SMS Start
$name = osc_user_name();
$mobile = osc_user_phone_mobile();
$msgs = "Thank You $name, You have Successfully Registered with Classified123.";
$msgb = urlencode($msgs);
$stra ="http://sms.website.in/api/mt/SendSMS?user=user&password=pw&senderid=ABCDEF&channel=Trans&DCS=0&flashsms=0&number=$mobile&text=$msgb&route=15";
file_get_contents($stra);
/////SMS End

Sending email through Appcelerator Cloud API

I was trying to send email through Appcelerator Cloud Service, in my Titanium app. The code I'm using is the standart one, given at the documentation site. But the email is not being sent.
Cloud.Emails.send({
template: 'welcome',
recipients: '*******#gmail.com'
},
function (e) {
if (e.success) {
Titanium.API.info('Email sent successfully.');
} else {
Titanium.API.info('Error:\\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
It give the this error, 'Email template welcome is not found'. I was thinking that template is the message to be sent in email. There is no help on API about this attribute , template. Can anybody explain it to me? I'll be thankful.
Thanx
The error shows that you haven't created an email template on the ACS website yet. The following steps will help you to create email template
Log in to your Appcelerator App Console
click "Manage ACS" under the app you're working on
click the "Email Templates" tab
"Create an Email Template".
also you can setup your SMTP settings as follows which worked for me.
Username: ________#gmail.com
Password: gmail account password
TLS: true/ false (both will work)
SMTP Address: smtp.gmail.com
Port: 587
Domain : www.gmail.com
That error means you haven't created an email template on the ACS website yet. Log in to your Appcelerator App Console, click "Manage ACS" under the app you're working on, then click the "Email Templates" tab, and "Create an Email Template".