Sending email from within a program

Avatar
  • Answered
I have an educational simulation in which administrators (professors) need to send a small zip file to each competing team prior to the start of the competition. I have designed the program so that they enter a team number and an email address and then click Send. The program sends a small message and the attachment using my email address [email protected] at Inmotion.
The program uses the following info to send the program:
.SMTPHost = "secure104.inmotionhosting.com"
.From = "[email protected]"
.FromDisplayName = "Simulation Administrator"
.Recipient = EmailAddress1
.RecipientDisplayName = "BPG team" & World1 & Company1

It works fine on my computer, but a user in Brazil tested it and received the following errors:
550 Helo required before mail
503 Sender not yet given

I want to send it through my account using a variant of sendmail to prevent problems present when trying to use MAPI with a number of different email clients. What do I need to do to make this work?

Dave
Avatar
JacobIMH
Hello Dave, and thank you for your question. It would depend on how exactly you're trying to code your application as to why it might work in one location but not from another. I see that you have a WordPress installation, and also a phpList one, is it one of these that you're having issues with? Or you also mention using a variant of sendmail, so are you doing this on a local program that you are then distributing to others? With the errors that you're getting back from the server it sounds like you're not properly setting up SMTP authentication in your application. Here is the failed connection from the mail logs:
rejected MAIL <>: HELO required before MAIL
SMTP AUTH is required for message submission on port 587
SMTP connection from (bpgsim.com) closed by DROP in ACL
You might wish to look into a pre-built PHP class such as phpMailer which already has SMTP authentication built in to it: phpMailer - Full Featured Email Transfer Class for PHP I hope that information was helpful, please let us know if you have any further questions. - Jacob