Send many emails without being marked as SPAM

Hello

I have a script that contacts several users everyday informing them about the latest news updates on daily basis. Now what I am afraid of is that given I am sending to like 40+ users (individually) daily, that this might mark my server/address as SPAM.
Is there a way to allow the script to send a large number of messages and is still safe from being marked as spam?

Thanks

Use a third party service such as CampaignMonitor or MailChimp.

Thank you, but no I need that technique in my own application (im integrating several things)… so what thing should i pay attention to? how should i send the message etc… in a way to avoid being marked as SPAM.

use of Sleep() and use message queues. I have written something similar. I am not sure how many messages would you send?

Thanks
How queues are done exactly?

I’m using a loop to send a different message to different users, sometimes it reaches 50, and I have to keep in mind future expansion.