Jump to content

Recommended Posts

Posted

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
  • Moderators
Posted

Ha thats what i have its just a form with a auto responder it collects the pilot ID when he sends the form so i know who if needed to respond to, i suppose you could personally contact them but i find a responder is just fine.

Guest lorathon
Posted

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);

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