Hello WineMan,
I have taken a closer look at the code of the index1.php file.
Regardless of whether the inclusion of index1.php succeeds, it will fail to generate the content from the feed for the email. index1.php expects the new entry. Although this already exists when the new entry is saved, the feed XML has already been parsed - but does not contain the newly saved entry. At this point, the savecont.txt file only contains the list of previous entries, without the new entry that you have saved.
The code in the index1.txt file also contains another weakness: it sends an e-mail to all subscribers in the data.txt file at the same time. Assuming you have 50 subscribers, your mail provider only allows 10 emails to be sent per hour to prevent you from generating mass spam, 40 will fall by the wayside.
What do you think of the idea of modifying the latest version of the
newsletter plugin so that it creates the content of the mail from the RSS feed instead of from the LastEntries and LastComments plugins? This has several advantages:
The widget already exists.
By switching from “Write new entry” to “Newsletter”, the feed XML is read again and compared with savecont.txt.
Your subscriber also has the advantage of being able to unsubscribe if they no longer wish to receive emails. The code in index1.php does not take this into account. Sooner or later, you could incur the wrath of those who no longer wish to receive emails from you.
Another weakness is that I could enter someone else's email in your blog parser widget. Hundreds of them, even though these email addresses don't belong to me. This makes you an unintentional spammer because your widget does not validate (opt-in) the email address you enter.
The newsletter plugin already provides a double opt-in.
Best regards
Frank