cancel
Showing results for 
Search instead for 
Did you mean: 

How to launch the action of sending mail in my custom module

How to launch the action of sending mail in my custom module

Hello,

I created my custom module magento 2 and added send mail function like this tutoriel

https://webkul.com/blog/magento-2-send-transactional-email-programmatically-in-your-custom-module/

My question is how to active the action of sending mail?

I wrote <a href="sendemail">Send</a>

where sendemail is the name of my controller

Any help please?

Thanks in advance

1 REPLY 1

Re: How to launch the action of sending mail in my custom module

Hi @sanaamini ,

This blog contain all required steps. first create all files in your module then call "yourCustomMailSendMethod" method from helper file in action file or  where  you want to send mail and pass all parameters of this method in it.

for call yourCustomMailSendMethod follow step 4# :Now template is ready and we will do code for send mail. 

if any doubt feel free to put it here.

Thanks