send

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

send

#1

Postby t4nu » Tue Aug 09, 2016 7:34 am

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.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Aug 09, 2016 7:40 am

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

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#3

Postby t4nu » Tue Aug 09, 2016 7:44 am

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.

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