Link to home
Start Free TrialLog in
Avatar of Roxanne25
Roxanne25

asked on

SQL Mail Agent Error, Trying To Set Up

Hello,

I have been trying to set up my sql mail all day today.  So far, I have successfully changed the sql services to use a proper logon account and not the "localsystem" account.  I then set up profile in Outlook 2000.  I went to the sql mail settings in the "support services" tab in enterprise manager and I was able to set the profile and test it successfully.

I tried to go into a job and set up an operator but it didn't work and said that the sql server mail agent had not been started.  I did some research and found that I could use the xp_startmail to start the service.  I went into query analyser and tried to run this and got the following error:

SQL Mail session started.
Server: Msg 18025, Level 16, State 1, Line 0
xp_startmail: failed with mail error 0x80040111

So, I'm kinda stuck as to what to do now...anybody know how to help me from here?  I have tried looking up some knowledge base stuff and it either confuses me or doesn't relate to what I'm doing.

Thanks!
SOLUTION
Avatar of JaffaKREE
JaffaKREE
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of roshkm
roshkm

How to Use CDO for Microsoft Windows NT Server (CDONTS) for sending email from SQL Server:

http://support.microsoft.com/view/tn.asp?kb=312839


OR You can go for creating a VBScript for sending and recving emails. Copy the follwoing and save as .vbs file.

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "sender@mail.com"
objEmail.To = "Recv@mail.com"
objEmail.Subject ="Subject on " & now()
objEmail.HTMLBody = strHTML
objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Your mailserver address
objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.hotmail.com"
objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send


Call the VBScript using XP_CMDShell / Write as a job/ Windows scheduled job.

Regards,
RKM
Avatar of Roxanne25

ASKER

Jaffa and Arbert,

I have followed those two articles and have done as instructed.
I can set up the profile and test it and it works...

However, I am getting that wierd error message and need to know how I can fix it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am running service pack 3
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please read my original message for the answer to this.

Thanks.
"proper" = domain account ?
I set it up to use the Administrator login for the machine and to use a pop3 for the profile...
Administrator on local machine ?

It needs to be a domain account.
It has to be a domain account even with pop3?  I don't have a domain account with admin rights... does that matter?  Or can I just add that user name to the admin group on the local machine?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have read that article in my research before... thanks for trying though.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes.
I'm not sure what else to look for.  You might want to use that white paper to double check the settings.  it must be an authentication issue.  Do you have an exchange server you can try, rather than pop3 ?
Yes, I have exchange but it says you have to have the domain login match the exchange login... which I don't have.
I would definitely try to acquire it.  There isn't nearly as much documentation on setting up pop3 as I'm sure you have found out.  What are the odds of you getting that information ?
Less than 1% :)

I work for a huge company and getting admin rights let alone a domain email box would be impossible.
I am also using SQL Server Personal Edition its not even a real server. :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, I was getting SQL Mail and SQLAgent Mail confused.  I was able to get the operator set up by setting the profile in the SQL Agent Mail instead of trying to use the SQL Mail.  I'm not sure how to allocate points on this...
JaffaKREE 499
Arbert 1
"JaffaKREE 499
Arbert 1"


Aren't you silly...Give them to Jaffa, it's apparent he's more deserving (just look at the previous post)
While the comments presented did not solve my exact problem and per my last post I had figured out another way... I went ahead and gave points on this question as the advice and comments presented did aid and give me valuable information in what I was trying to do.

Thanks guys.