The code you quote will send an email direct to the mail server of the person that you are sending the email to. The underlying DLL that SysMailer wraps (DsMailer.dll) makes an SMTP connection, in your example, to one of the following three machines (info from an NSLOOKUP on the operatech.com.tr domain)
operatech.com.tr MX preference = 0, mail exchanger = mail.doruk.net.tr
operatech.com.tr MX preference = 9, mail exchanger = etrn.doruk.net.tr
operatech.com.tr MX preference = 15, mail exchanger = etrn2.doruk.net.tr
If, for some reason, your system is unable to reach any of those machines then it cannot send the email. When it tries to make the connection it must perform the same NSLOOKUP operation that I did to get the names and IP addresses of the machines it needs to send the email to. Your code hasn't defined any name servers for SysMailer to use when it does this, so it will resort to using the Internet's root name server, which are very busy beasts and might not return a result in a reasonable time. In addition, the mail servers you are trying to connect to might be unavailable for some reason (maybe they are down or the Internet link of the people that own them is dead) which might also cause the send operation to timeout. For these reasons you should configure either (or preferably both) a smart host or a local DNS server for Sysmailer to use.
SysMailer includes methods to access an SMTPRelayServer collection and a DNSServer collection for this purpose. As a minimum I would recommend using a (local) SMTP relay server (smart host), which would be your own mail server. If you can add a DNS server, so much that better (you can get SysMailer to validate email addresses if you have that).
Hope that helps
Malcolm Burtt
Touchstone
"Business Solutions designed for YOUR business processes"
_____
From: development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Özcan Ayyildiz
Sent: 01 September 2005 07:46
To: development-axapta@yahoogroups.com
Subject: [development-axapta] time out error :send email with sysmailer class
Hi,
I try to sent email with following the code I get an error as the
connection time out.
SysMailer mailer = new SysMailer();
mailer.body("This is the body of the mail");
mailer.subject("The message subject");
mailer.fromAddress("from ");
mailer.fromName("name");
mailer.tos().add("[EMAIL PROTECTED]");
mailer.sendMail();
I have tried to add time like this..
SysMailer mailer = new SysMailer();
mailer.timeOutConnect(3600);
when I try to send email I can send email all yahoo addresses.but I
couldn't sent another addresses..
example :all hotmail addresses..
do you know anything about this problem..
thanks..
[Non-text portions of this message have been removed]
SPONSORED LINKS
Microsoft business solution <http://groups.yahoo.com/gads?t=ms&k=Microsoft+business+solution&w1=Microsoft+business+solution&w2=Microsoft+axapta&w3=Basic+programming+language&w4=Computer+programming+languages&w5=Programming+languages&w6=Java+programming+language&c=6&s=181&.sig=RpZ8o-4GAXPYNH9XEa8ilQ> Microsoft axapta <http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Microsoft+business+solution&w2=Microsoft+axapta&w3=Basic+programming+language&w4=Computer+programming+languages&w5=Programming+languages&w6=Java+programming+language&c=6&s=181&.sig=NVCZJ6zWd61AIkqmGCk0LQ> Basic programming language <http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Microsoft+business+solution&w2=Microsoft+axapta&w3=Basic+programming+language&w4=Computer+programming+languages&w5=Programming+languages&w6=Java+programming+language&c=6&s=181&.sig=LVtDqIF7xElEqxvFT1kI4Q>
Computer programming languages <http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Microsoft+business+solution&w2=Microsoft+axapta&w3=Basic+programming+language&w4=Computer+programming+languages&w5=Programming+languages&w6=Java+programming+language&c=6&s=181&.sig=xZjuOjGeV1FMGyTGAgy8Uw> Programming languages <http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Microsoft+business+solution&w2=Microsoft+axapta&w3=Basic+programming+language&w4=Computer+programming+languages&w5=Programming+languages&w6=Java+programming+language&c=6&s=181&.sig=1CIHID2DM-uv-Ck3CPBVaA> Java programming language <http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Microsoft+business+solution&w2=Microsoft+axapta&w3=Basic+programming+language&w4=Computer+programming+languages&w5=Programming+languages&w6=Java+programming+language&c=6&s=181&.sig=vzIcb3_8fP0nz-gKW4wQdg>
_____
YAHOO! GROUPS LINKS
* Visit your group "development-axapta <http://groups.yahoo.com/group/development-axapta> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
_____
[Non-text portions of this message have been removed]
SPONSORED LINKS
Microsoft business solution | Microsoft axapta | Basic programming language |
Computer programming languages | Programming languages | Java programming language |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" 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.