Error Using SmtpMailXControl1.SmtpMailX
mjhand
Member Posts: 2
Problem
Error trying to send email from Codeunit, where exchange is installed on the Navision database server
Code
SMTPMail.SetWorkMode();
SMTPMail.SetUserID('Administrator');
SMTPMail.SetFromAdress('from.co.uk');
SMTPMail.SetHost('192.x.x.x');
SMTPMail.Addline('Body of Email');
SMTPMail.SetToAdress('to.co.uk');
SMTPMail.SetSubType(1);
SMTPMail.Send;
Error
This message is for C/AL programmers:
The call to member Send failed. SmtpMailXControl1.SmtpMailX returned the following message:
503 5.5.2 Need rcpt command
Error trying to send email from Codeunit, where exchange is installed on the Navision database server
Code
SMTPMail.SetWorkMode();
SMTPMail.SetUserID('Administrator');
SMTPMail.SetFromAdress('from.co.uk');
SMTPMail.SetHost('192.x.x.x');
SMTPMail.Addline('Body of Email');
SMTPMail.SetToAdress('to.co.uk');
SMTPMail.SetSubType(1);
SMTPMail.Send;
Error
This message is for C/AL programmers:
The call to member Send failed. SmtpMailXControl1.SmtpMailX returned the following message:
503 5.5.2 Need rcpt command
0
Comments
-
That's an SMTP error. RCPT is the recipeint. It doesn't like something about the recipient.
Does your code actually say "SMTPMail.SetToAdress" or "SMTPMail.SetToAddress"? (the first one has one 'd' in 'Address', the second one has two). Does that make a difference?
Tim0 -
Here is a list of the most common SMTP-errors: http://www.massmailsoftware.com/ezine/p ... -04-30.htm
As error 503 means "Bad sequence of commands" I suspect the problem is the order of your SMTPMail methods and properties.421 Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down)
450 Requested mail action not taken: mailbox unavailable (E.g., mailbox busy)
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognized (This may include errors such as command line too long)
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
550 Requested action not taken: mailbox unavailable (E.g., mailbox not found, no access)
551 User not local; please try
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed (E.g., mailbox syntax incorrect)
554 Transaction failedNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 329 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
