I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.
I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .
but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .
when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.
Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?
here is the log file after executing sp_send_dbmail:
1) "DatabaseMail process is started"
2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."
The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?
please help me.
POUYAN
Hi
This article in the forums seems to refer to your problem:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=718220&SiteID=1
It think it implies that the machine you are connecting to as an SMTP server is not actually running an SMTP service. You need to check that the machine you have set as the mail server is correct and that SMTP is running on it (on the standard port). There might also be a firewall issue between you and that machine.
I think if it was an authorisation issue with the SMTP server you would get a different error.
|||Any way thank u.
I'll give it a try
|||Hi
By default service broker is enabled in each database except 'master' & 'tempdb'
any way again I enabled service broker.
where as DatabaseMail90.exe is triggerd whene I execute sp_send_dbmail,the mail should be given to the queue.but when I execute
sysmail_help_queue_sp to see the queue the 'length' column is 0 which says there is no mail in the queue.I'm confused.
More over I think another problem is that DatabaseMail90.exe can not communicate with the machine(server) .
do u know how I can check communication settings (ports,... ) between SQL SERVER and the server to see what's going on?
thanks.
POUYAN.
|||Database Mail uses SMTP, unlike the old SQL Mail that used Exchange by piggybacking off Outlook/MAPI. In other words, if you're trying to point it to your organization's Exchange server, it won't work unless Exchange is accepting SMTP connections. (I know only slightly less than jack squat about Exchange, so I have no idea how to enable it, or if it's enabled by default.)If you want to test connectivity, use telnet from the command prompt:
telnet server-address 25
If you see some prompts from the server, or a blank screen with the cursor flashing, then the connection is probably fine. (Hit Ctrl+] and then type quit to exit telnet.) If you receive a message stating that the connection failed, then the issue is most likely that the machine you're pointing at isn't running SMTP. If you can get through with telnet, but DB Mail is still puking, then make sure whatever mail server you're pointing at isn't disallowing your database server to relay mail through it.|||
After doing some efforts now every thing looks to be ok.
in the log :
"Message was sent succesfully "
this shows that the mail was transfered from database mail to SMTP server.
but still the mail is not sent to the email address.
any idea?
|||After doing some efforts now every thing looks to be ok.
in the log :
"Message was sent succesfully "
this shows that the mail was transfered from database mail to SMTP server.
but still the mail is not sent to the email address.
any idea?
|||In my experience, it's normally been one of two things.1. Spam filtering. Pretty self-explanatory.
2. The SMTP server you're directly sending to is misconfigured, or otherwise unable to connect to any other mail servers. If you're running IIS SMTP, you can check C:\Inetpub\mailroot\badmail (or whichever directory you've moved Inetpub or badmail to) and see if there are any messages in there that it's given up on trying to deliver. Also, I believe the messages will sit in \Inetpub\mailroot\queue for some time before being thrown in badmail.|||
U where right the problem was spam filtering
Thnks a lot for ur help.
POUYAN.
No comments:
Post a Comment