close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Help with Curl to send emails

Thread began 5/04/2018 11:43 am by iain331081 | Last modified 5/10/2018 9:31 am by Ray Borduin | 1851 views | 9 replies |

iain331081

Help with Curl to send emails

Hi Ray - this is something you helped out with before, but am just trying to replicate something similar in a different scenario. Probably a slightly more straightforward scenarios, as its based on a single insert rather than multiple insert.

Basically have a page where a user can add a news story into a table (product_updates), which should trigger an email to users that are connected to the lodge that the news item is about.

So the product_updates table stores the LodgeID, which should also go into the array, and the SQL uses that to return the users that are connected to that lodge via the table product_likes.

I think it must be mostly there, but I have missed something somewhere, as it doesn't seen to be sending emails. If you could have a look at the attached files, that would be much appreciated. Also would be happy to take this to a premium ticket as I know its a bit beyond the WA functionality.

The files attached are the page for adding the news item (index111.php) as well as the associated files.

EDIT: Hi Ray - I think its to do with the fact that the original was based on a multiple insert, whereas this one is just a single insert. But I'm nit sure what the syntax should be in the code for the CURL stuff. It may not even need the array if its a single insert, but just have the SQL part?

Sign in to reply to this post

Ray BorduinWebAssist

Please sign up for a premier ticket. I'm not sure if you need curl at all. I'd like to go over it with you and we can figure out the best solution that way.

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

Thanks Ray - I'll send you a message on Skype

Sign in to reply to this post

Ray BorduinWebAssist

Sounds good. I'm busy today but should have time tomorrow morning... we will work it out through Skype.

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

Thanks Ray. I'll be around until around 11am your time tomorrow if you have time early on. I might be around again for a bit later on, not sure yet. Send me a message on Skype and hopefully we'll both be around at some point.

Sign in to reply to this post

iain331081

Hi Ray - I have just messaged you on Skype. I was running late so would be a bit rushed to look at it now. And I am travelling home over the next couple of days. If you were able to have a look at it without me over the next few days that would be much appreciated. If not, no worries. All the info is on Skype. Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

I just posted the fix and updated you via Skype... Please reply there if you have any questions.

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

Hi Ray - posted on Skype, but something isn't right still I don't think. When we looked at this before, it was working with the PEAR_Mail_using_SMTP.php. I have attached the index, send_email and waue_index_agent_connect.php pages from our other website from which its all working. Attachment is the wa_curl_multiple_insert_working.zip.

Sign in to reply to this post

iain331081

And these are the files you've been looking at. send_email_news_ray.php is the version I just downloaded, but I may have uploaded an incorrect version before as there is a reference to PartnerIDPL in the array. Send_email_news.php is the version with the LodgeID in the array, which I thought was all that is needed here?

And the SQL:

$query_EmailList = "SELECT DISTINCT Email, Firstname, Username, Password
FROM trade_users
INNER JOIN product_likes ON trade_users.UserID = product_likes.UserIDPL
INNER JOIN lodges ON lodges.LodgeID = product_likes.LodgeIDPL
";
$query_EmailList .= " WHERE subscription = 'Gold' AND LodgeID IN (".implode(", ",$WA_lodgeArray).")";

So the news item is added for that LodgeID, the LodgeID is stored it the array. And then the SQL sends an email to every user which is connected to that lodge via the product_likes table.

Were you able to see any emails sending?

Sign in to reply to this post

Ray BorduinWebAssist

Please contact me Via Skype and we can work through any remaining issues.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...