Hi,
I have several modules that in the end they send email.
Because the steps are exactly the same except the email resource, I think I want to put the steps in the function and send the email resource as the parameter of the function. Is it possible to do it? If so how?
I have tried to send it, but when I execute the sendmail method, it failed.
Thanks in advance for the help.
send
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You can pass an email resource as an argument e.g.
Code: Select all
function send(emailresource)
{
emailresource.sendmail();
}
// send email
send(resources.email1);
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
IC.
What I have tried to do is send the name of the email resource to the function and then using getResource function to get the resource and execute the sendmail.
Thanks I will try it.
What I have tried to do is send the name of the email resource to the function and then using getResource function to get the resource and execute the sendmail.
Thanks I will try it.
Jon wrote:You can pass an email resource as an argument e.g.
Code: Select all
function send(emailresource) { emailresource.sendmail(); } // send email send(resources.email1);
0 x
Who is online
Users browsing this forum: No registered users and 14 guests