Gmail – Send the same email every two weekdays with Gmail

emailgmail

Please note I've searched for similar questions within the site, but none of them contains what I need.

In a nutshell; I would like to send the same reminder email every two weekdays from Gmail (i.e: Every Monday, Wed. and Friday).

I've been investigating and found Zapier, but couldn't make it work. There probably is another easier alternative.

Is there any way to achieve this?

EDIT: The content of the automated email I'd like to send every two days is just a String; i.e: "lorem ipsum dolor sit amet"

Best Answer

Without knowing your enviroment and what exactly you want to put in email I can't give much detail. But you can send a email using command line (or a script) and then schedule this to run that command/script every 2 days.

In windows, for example, you can use powershell to run command then schedule using task scheduler to run. Of course, you can try to find and use a third party tool to do the same thing.

Edit:

You still didn't say what is your OS (Windows, Unix, MAC?)
Anyway, assuming you're using windows:

  1. Run this on a powershell windows, replace myPassword for sender email account's password, also change Out-File parameter to a place that you have permission to write if you don't have permission to save in C:\

    "myPassword" | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString | Out-File "C:\EmailPassword.txt"

  2. Create a file (that will be your script) and save with extension .ps1 .Below an example of ps1 file, change it to your values before saving it:

    $From = "yourUser@gmail.com"
    $To = "email_who_you_wanna_send_to@domain.com"
    $File = "C:\EmailPassword.txt"
    $cred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $From, (Get-Content $File | ConvertTo-SecureString)
    # If you want to put attachment you will need to uncomment line below
    # $Attachment = "C:\users\Username\Documents\SomeTextFile.txt"
    $Subject = "Here's the Email Subject"
    $Body = "This is what I want to say"
    $SMTPServer = "smtp.gmail.com"
    $SMTPPort = "587"
    # If you want to use $Attachment you will need to add -Attachments $Attachment to command below
    Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -Credential $cred -port $SMTPPort -UseSsl -DeliveryNotificationOption OnSuccess

  3. Run script in a powershell window, in order to test if is working correctly.

  4. Now you just need to use create a task using TaskManager on windows and setup to run this script each 2 days, or whatever you want.

IMPORTANT: Just remember that sender email account's password is not really secured, since is saved on a file in your machine and is not really much encrypted, if someone get this file and knows powershell, he will be able to decrypt and find out this password. SO BE WARNED.