09-05-2016, 07:31 PM
As an alternative, can use C# to send email.
from http://stackoverflow.com/a/32336/2547338
Macro C# send email
But this will not work on Windows 2000. Also on XP without .NET.
from http://stackoverflow.com/a/32336/2547338
Macro C# send email
CsFunc("" "password" "to@example.com" "Subject" "Body")
#ret
//C# code
using System;
using System.Net;
using System.Net.Mail;
public class Email
{
static public void Send(string password, string email, string subject, string body)
{
var fromAddress = new MailAddress("xxx@gmail.com", "From Name");
var toAddress = new MailAddress(email);
var smtp = new SmtpClient
{
;;;;Host = "smtp.gmail.com",
;;;;Port = 587,
;;;;EnableSsl = true,
;;;;DeliveryMethod = SmtpDeliveryMethod.Network,
;;;;UseDefaultCredentials = false,
;;;;Credentials = new NetworkCredential(fromAddress.Address, password)
};
using (var message = new MailMessage(fromAddress, toAddress)
{
;;;;Subject = subject,
;;;;Body = body
})
{
;;;;smtp.Send(message);
}
}
}But this will not work on Windows 2000. Also on XP without .NET.
