this was working perfect for about 1 year and now have this error
553 5.1.2 The address specified is not a valid RFC-5321 address. o77sm1382514vke.27 - gsmtp
my code
Dim Mail As New EmailMessage
dim file as emailAttachment
Dim SendTo,s As String
Dim i As Integer
Dim kk As String
eMailControl01=New eMailControl
SendTo=CompanyEmail
FrmPos.LabMsgText.Text=""
If System.Network.LookupIPAddress(“google.com”) <> “” and MaineMail.Trim <> “” Then
eMailControl01.Address ="smtp.gmail.com"
eMailControl01.Port = 587
eMailControl01.Username =MaineMail.Trim
eMailControl01.Password = MaineMailpass.Trim
// Connect To Server
eMailControl01.Secure = True
eMailControl01.ConnectionType = SSLSocket.TLSv1
eMailControl01.Connect()
// Populate Email Message
Mail.FromAddress =CompName
Mail.Subject =eNombre
Mail.BodyPlainText =eMensage
Mail.Headers.AppendHeader eLocate01,"GasPos v1.0"
if mAttachFile <> "" then
file = new emailAttachment
file.ContentEncoding="UTF8"
file.loadFromFile getFolderItem(mAttachFile)
mail.attachments.append file
end if
'SendTo = txtSendNumber.Text + "@" + pmCarrier.RowTag(pmCarrier.ListIndex)
s = replaceAll(SendTo,",",chr(13))
s = replaceAll(s,chr(13)+chr(10),chr(13))
for i = 1 to countFields(s,chr(13))
Mail.addRecipient trim(nthField(s,chr(13),i))
next
// Send Email
eMailControl01.Messages.Append Mail
eMailControl01.SendMail()
Else
FrmPos.LabMsgText.Text="********** No Internet **********"
End If