Send email every hour

SYSTEM INFORMATION
OS type and version Rhel9
Webmin version 2.101
Virtualmin version 7.7
Related packages SUGGESTED

I have a list of emails id’s. I want to send emails one by one every hour. Is it possible?

@Joe @Ilia Please guide me. thanks.

I don’t understand what you’re trying to do. There’s a lot of ambiguity in your description.

When you say “email id’s” you mean email addresses, I guess?

And, when you say “one by one every hour”, do you mean you mean you want the same single email sent to each email address an hour apart? Or do you mean you have a series of emails to send to each email address, every hour?

In either case, though, I don’t think we have any tools for exactly that. You can schedule an email in Usermin, but I don’t think you can to what you’re suggesting.

I think you’d probably need to make a custom cronjob to do it. Sending mail from scripts is dead simple; the only somewhat tricky part is implementing a queue to keep up with which email addresses have been sent which emails (if it’s more than one email).

Lots of examples of sending mail from the command line here: How to send an email using sendmail command in linux - Stack Overflow

@Joe Thanks for replying to me

I mean, I want the same single email sent to each email address an hour apart. Is it possible?

Anything is possible.

But, Usermin does not provide a UI for that use case. I’ve never heard of anyone needing to do that, so it’s not a thing any of us have ever considered as a desirable feature. You’ll probably need to make your own cron job for it. There’s a bunch of ways to do it, simplest is just to keep a count of which email address from the list you’ve already emailed…i.e. read a number from a file, increment it, send to the email address that corresponds to that line in the file, write the number out. Repeat an hour later.

I can’t write the script for you, but Linux has all the tools to do it in under a dozen lines of code. The problems to solve:

Reading a specific line from a file (based on line number): https://www.baeldung.com/linux/read-specific-line-from-file

Adding numbers (to increment line numbers): shell - How to do integer & float calculations, in bash or other languages/frameworks? - Unix & Linux Stack Exchange

I’d just use the POSIX shell option, e.g.:

linenumber=3
linenumber=$(($linenumber + 1))
echo $linenumber

You can read from a file with read variable_name < file_name and write to a file with echo $variable_name > file_name.

I think you can do it in about half a dozen lines of code, actually. Perl or Python or Ruby might be more readable, if you’re more familiar with them, but a POSIX or bash shell script can do it real quick.

1 Like

You could also use a php cli script. Php has the ability to send mail directly from a script has reasonable file manipulation in order to save the progress through the email list. If you need I’ll trot a small script out for you

Thank you Joe.

This is an India problem and I am glad you pointed it out. Many years ago, somebody in government decided that info@domsin.tld should be the default email address for the domain (the ignoramus had never heard of an autoresponder) and as a result of that almost everybody in India now uses an email address in that format.

More recently, someone in India’s nationalised banking system though it was clever to use email ID, since India already has half a dozen citizen IDs so why not one more, and everyone now refers to an email address as email ID.

If I ever get hold of that banker, I shall have a thing or two to say to him.

This is not related to the Indian problem or related to the Indian government or banker. Actually, it’s related to the Google issue. I am a website developer, System Administrator, and Network engineer’ and I want to start bombarding emails to the email IDs that I have a list of emails. I have a list of more than 1 Lacs email IDs ( Indian Email IDs). The issue is when I start bombarding my promotion email to the list of email IDs. Google Spamhaus start catching my email and blacklisting my IP address. I have removed my IP many times from Spamhaus That’s why I want to add all email IDs and send email hour per hour as per the scheduler setup. My main purpose is to promote my brand and get work from them. If you have a better way to promote or get work. Please tell me.

There is no such thing as email ID. Email is not an ID. A person can have multiple email addresses, so an email address can not act as a means of identification or ID.

Please stop calling email addresses email IDs.

Please also stop spamming. You are not allowed to ‘bombard’ people via email. Your ISP forbids it. Your VPS hosting service forbids it. The cyberlaw of India forbids it. Your ethics should also forbid you. It is unethical and perhaps even illegal for you to send unsolicited bulk mail to 100,000 email addresses.

Don’t do it.

Different conventions are fine, as long as we understand each other. I didn’t understand what was meant by “email ID” in the beginning, but now I do. No reason to get upset about it.

But, OP, “email ID” is an unusual term that most Americans (and maybe Europeans) won’t recognize as meaning “email address”. I assumed based on context that’s what you meant, but I asked for clarification because “ID” is often used to identify a specific email message. In the mail log every email has a unique queue ID (looks like, “3314088”) which allows tracing an email through the whole process to delivery or rejection or whatever, and that can be derived from the message ID, which is a long string (looks like 20231001155602.79FF6380037@n1.virtualmin.com, but can have a lot of variability). I’ve never heard “email ID” refer to an email address, until now. I’m not upset about it (though calport seems to be), it just made it harder for me to understand your request.

In short: You may find folks understand you more quickly if you use “email address” to refer to the email’s sender or recipient, since that’s the term most folks are familiar with.

I want to start bombarding emails to the email …

I want to send emails one by one every hour

I am a website developer, System Administrator, and Network engineer

In fact, you want to get your own MailChimp, but you don’t know how to do it. If you had done a search on the Internet, you would have found solutions to the question.

Starting from the mentioned quotes above, I would make the following remarks

  • For “bombarding” an email address you must have the consent of its owner, otherwise it is illegal to send unsolicited messages. I understand that you want to promote your services and business, but even though you think it’s helping, it’s actually doing you a big disservice.

  • Sending the same message every hour denotes stupidity because you irritate and annoy the recipients so much that they will block you, and if they fail, they will report you. Not all providers of DNSBL, URIBL delist an address or domain for free, there are some who ask $50 for it.

  • An engineer should have a certain ethical conduct, plus specific knowledge of the field.

Thanks to people like you, in the last two months I have faced the biggest wave of SPAM I have ever encountered in my life, which daily flooded the mailboxes of a bona fide company with over 200 workstations. Fortunately, my knowledge allowed me to control this unprecedented situation. I think you wouldn’t want to get 1 - 10 email per second in your mailbox, each one coming with a different IP, with a different email address, with a different header/body.

I will make a post after this DDoS-like attack calms down how to prevent extremely efficiently and quickly large amounts of SPAM without losing important messages, so that whoever reads and implements it will cause such spammers to reconsider their actions.

@Joe - I suggest closing this thread.

@calport Thanks for correcting me. Its email address not email id.

I mean i want the same single email sent to each email address an hour apart that is in my email address list. Send only one time not on repeating.This is not illegal if you send email on one time. If you send same email at the same email address many times then its illegal. I got many email regarding my other website’s SEO from many countries like USA, Canada, UK and Australia. That’s means its illegal too.

I would never start a business with someone who is desperate enough to send me 24 messages a day. If it is the same body or not it does not change the situation at all. I doubt that you can create 24 messages with different content daily, you are not a news agency. You don’t realize that you are annoying the recipients every hour. Most will block the messages as best they can then report you. The IP address, the host name, will propagate and you will no longer be able to send emails to anyone.

Y’all calm down. OP wants to send one email to one recipient per hour. That’s not a deluge of spam. (I’m assuming good intentions here. I guess it’d be possible to send spam at one per recipient per hour, but it wouldn’t even begin to be profitable…spammers send millions of mails a day, not 24).

I believe OP does have a spam problem if their IPs keep getting blocked, though. But, it’s probably an exploited web app or one of their users doing the spamming, rather than sending out a few dozen messages.

We’re not getting anywhere good by yelling at folks for having technical problems.

@Joe Thanks Joe you understand me. You are right i wants to send one email to one recipient per hour.I guess it maybe profitable for beginner. I don’t want to send millions of mails a day and start spamming. I want to send 10 to 200 mails per day as per google policy but not more than 200.

If it’s UCE (unsolicited commercial email), you’ll still get blocked. It’s not just the number of emails, it’s what it is you’re sending. If it’s commercial email to people you have no relationship with, that’s spam that will get you blocked by many providers, including Google (Spamhaus is not Google, BTW, and there is no relationship between Google and Spamhaus, Google maintains their own spam blacklists, independent of others).

We send many more than 200 emails a day (I think we send about 1000/day, total), and don’t get blocked as spam, because what we’re sending are notifications from users who signed up to receive them. It’s not unsolicited, so it isn’t spam.

I assumed you meant you were sending to people who expected email from you. There is no technical solution to sending mail to people who don’t want it. You can’t slow roll spam to avoid being blocked, and Google policy does not allow 200 spams a day.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.