Jump to content

sending email with info from mysql database inserted


Gunnyk

Recommended Posts

Hello!

 

I do not know if this is the right place, so please redirect me if it is not............................

 

I would like to send a reminder email for clients and pull info from mysql database inserted into it... such as:

 

Dear <  client name >

Reminder that you have <type of appt> on <date> <time> with counselor < staff name>.

 

If you cannot make it let us know..............................   

 

All I've been able to see online is how to attach data into excel sheet.. I'd like to send this within an email.

 

Is this possible?  I have mysql (latest ver); php 7.4.9  running on ubuntu 20.10

 

Thanks for any help

 

 

Edited by Gunnyk
Link to comment
Share on other sites

All you have to do is write a query to pull up the info from your db and generate each email from a loop that includes each query result row's data.  Think about it.

Of course if you can make the email contents generic then all you have to do is feed all of the mailing addresses to your email generator and send just one email out to multiple people.  Do you use PHPMailer?

Link to comment
Share on other sites

gw1500se,

 

I have not tried anything as I have no idea what to do.  I can write a query for the data needed.  That is not the problem.  The issue is, I have the data, but have no idea how to place it into an email.

Once I learn how to do that, I'll need to put the whole thing into a cronjob so it will send automatically based on the appointment being 'tomorrow'

I just cannot find a starting point via google search

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.