Forum

Thread tagged as: Question, Installation, Addons

Custom Email

Hi to all,

Can you help me regarding my issue, I don't how to create and send my custom mail ? Could anyone help me with this. I'm really a newbie regarding this.

Thank you in advance

JRden Fadallan

JRden Fadallan 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

I'm not sure what you mean about custom email.

Where are you doing this in Perch?

I apologize for that what I mean is that I want to create like a mailing list to newsletters, receipts to my users ? Is it possible in perch ? How can I do that,

Thanks ^_^

I'm sorry what I mean is that how can I send mails using the Perch API

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You could develop your own app to do that, if you are not a PHP developer however you could use the MailChimp App.

https://grabaperch.com/add-ons/apps/mailchimp

Thanks for the help, Can I just use the Members App mailing function ? to send my mails ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The Members app doesn't have a mailing function.

Hi, For those who are having trouble to send mail, I've found the code on the perchAPI

$API = new PerchAPI(1.0, 'perch_members');
        $Email = $API->get('Email');
        $Email->set_template('members/emails/welcome.html');

        //Variables that you can use on the template or welcome.html
        $Email->set('salutation', $salutation . '|' . $partnerID);
    $Email->set('pass',$clear_pwd);
    $Email->set('memberEmail',$partnerEmail);
        $Email->senderName('Vin Duc');
        $Email->senderEmail('test@gmail.com');
        $Email->recipientEmail('trooper@gmail.com');
        $Email->send();

You can send this code to directly send your custom mail just modify or add a new template that will suite your needs. You can directly send mails using php don't forget to add

 <?php include('perch/runtime.php'); ?> 

at the top of your php code.

Anyways Thanks.