Gunnyk Posted September 22, 2021 Share Posted September 22, 2021 (edited) 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 September 22, 2021 by Gunnyk Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/ Share on other sites More sharing options...
Barand Posted September 22, 2021 Share Posted September 22, 2021 What have you tried so far? Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/#findComment-1590232 Share on other sites More sharing options...
gw1500se Posted September 22, 2021 Share Posted September 22, 2021 What is your real question? How to send email or how to extract data from Mysql? Yes you can do either or both. What have you tried and what didn't work? Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/#findComment-1590233 Share on other sites More sharing options...
ginerjm Posted September 22, 2021 Share Posted September 22, 2021 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? Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/#findComment-1590234 Share on other sites More sharing options...
Gunnyk Posted September 23, 2021 Author Share Posted September 23, 2021 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 Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/#findComment-1590247 Share on other sites More sharing options...
jarvis Posted September 23, 2021 Share Posted September 23, 2021 Hi @Gunnyk Would something like this be a good starting point? Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/#findComment-1590254 Share on other sites More sharing options...
Gunnyk Posted September 23, 2021 Author Share Posted September 23, 2021 jarvis, Thank you! I can now start my experiment of 100 failures = 1 partial working...... ( ) Quote Link to comment https://forums.phpfreaks.com/topic/313792-sending-email-with-info-from-mysql-database-inserted/#findComment-1590256 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.