Rank: Newbie
Groups: Registered
Joined: 3/24/2022(UTC) Posts: 1
Hello, I am trying to send an email through EASendMail but receive 501 5.5.4 Invalid Address error. here is my code. Dim mailAdresses As String = "mymail@company.com" Dim recipients As AddressCollection = New AddressCollection() recipients.AddRange(New AddressCollection(mailAdresses)) Dim address As EASendMail.MailAddress = TryCast(recipients(0), EASendMail.MailAddress) mail.[To].Add(address) I try also this. Dim mailAdresses As String = "mymail@company.com" mail.To = New AddressCollection(mailAdresses) Nothing helps. Anyone has any idea? Thanks.
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,154
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
Rank: Newbie
Groups: Registered
Joined: 3/24/2022(UTC) Posts: 1
I found out what caused the problem and it was the server. Here is my code. Dim mailServer As String = "X.X.X.X" '(IP Address) Dim smtp As SmtpClient = New SmtpClient() Dim server As SmtpServer = New SmtpServer(mailServer, 25) server.UseDefaultCredentials = True server.ConnectType = SmtpConnectType.ConnectTryTLS smtp.Connect(server) and if i delete ConnectType section the error turns to "The requested name is valid, but no data of the requested type was found" Really annoying.
Rank: Newbie
Groups: Registered
Joined: 3/24/2022(UTC) Posts: 1
by adding these two lines which is down below solved my problem. Thanks server.HeloDomain server.MailFrom
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.