Hi
The code looks okay to me on cursory inspection. What you
might want to check is whether the relay server you're using is configured to
allow you to connect to it. Its common to configure SMTP servers to have a
restricted list of machines that are allowed to relay through it and it might be
this that's preventing your code form working (I can't recall the error you get
when this is the case though).
To check if this is the problem, do the following from the
machine that is running the SysMailer code (i.e. your client machine if its
client code or your AOS if its server code).
-
Bring up a windows command window
-
Enter "telnet smtp.xxx.com 25"
-
If you get an SMTP prompt (i.e. no error), type
-
HELO yourMachineName
-
MAIL FROM:yourEmailAddress
-
RCPT TO:testEmailAddress
-
DATA
-
mail message text
-
.
The SMTP conversation above ends when you input a line that
only has a "." character on it. Note that its unlikely you will see any of the
characters that you type in as the telnet program will not echo them to the
screen, so type carefully. :-)
If your chosen SMTP relay machine is accepting relay
requests from your machine then the message you typed in should be sent okay. If
not, you'll get an error along the way that will explain what your problem is
and you can look at the SMTP server configuration to solve the
problem.
Hope that help you some
Regards
Malcolm Burtt
Touchstone
Our Trusted Solutions -
Your Optimised
Business
From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pieter m
Sent: 24 November 2005 07:53
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Question : SysMailer
Could u tell me how to use SysMailer?
I has written code like below :
SysMailer smsMail;
;
smsMail = new SysMailer();
smsMail.SMTPRelayServers().add('smtp.xxx.com',
25,'xxx.xxx.xxx.xxx','xxx','xxx');
smsMail.body('SMS test');
smsMail.subject('Just Testing');
smsMail.fromAddress('your Mail address');
smsMail.tos().add('[EMAIL PROTECTED]');
smsMail.sendmail();
}
But I got error message :
Method 'SendMail' in COM object of class
'Dundas.mailer' returned error code 0x80004005
(E_FAIL) which means: The socket connection failed.
What is the cause of that error? And what is the right
code to use SysMailer?
Thx u.. :D
Cheers,
Pieter M
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Sharing the knowledge on Axapta.
SPONSORED LINKS
Business finance course | Business to business finance | Small business finance |
Business finance consultant | Business finance magazine | Business finance schools |
YAHOO! GROUPS LINKS
- Visit your group "Axapta-Knowledge-Village" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.