Jump to content

Sending Mail to Specific Pilot (one pilot only)


Recommended Posts

Hello there,

We have a system where pilots can submit schedules that they wish to add to our databases. They are then validated and added by one of the admins. Given that I know the pilot's ID is there a built in function/class that will allow me to send the pilot an email with i.e. "Hi there, your schedule request was accepted and added"

Of course, there is the long way of sending an email with PHP, but phpvms has so many built in features, I am wondering if a mailing feature is also present.

Nout

  • Like 1
Link to comment
Share on other sites

Guest lorathon

Use the Util class

Util::SendEmail($email, $subject, $message, $fromname='', $fromemail='');

You can even use a template as the message

$message = Template::GetTemplate('email_template.tpl', true);

So a simple code would be something like

$pilot = PilotData::getPilotData($pilotid);
$subject = 'Schedule Received';
$message = 'We received your schedule and an Administrator will review it and get back to you';
Util::SendEmail($pilot->email, $subject, $message);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...