Re: SQL Mail

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steen Persson (SPE_at_REMOVEdatea.dk)
Date: 07/01/04


Date: Thu, 1 Jul 2004 16:07:46 +0200

Hi

I'm having the same problem with sending mails from SQL.
I've installed Outlook 2003, I'm logged on as the user for which the mailbox
has been setup (sqladmin), both the SQLserver and SQLServerAgent services
runs under this account, I can open Outlook and send "manual" mails without
any problems, but when I under Operators create the operator and click
"Test" I get the error 22022 - The SQL ServerAgent Mail session is not
running..etc.. I have no problems in clicking in the ".." box to get it to
look up my name in the Global Address list so in some way it's able to open
Outlook. I've also went to SQL mail and set up a mail profile.

If I'm trying to send a mail using the xp_sendmail it works fine.

I can't think of any other things to check to get it working so I hope that
some of you have some ideas.

Regards
Steen

"BMF1" <anonymous@discussions.microsoft.com> skrev i en meddelelse
news:218d901c45aea$eed6d400$a101280a@phx.gbl...
Joe,
>From the documentation I've read workgroups are not
referenced. However, KB Article 263556 has a
statement "SQL Mail requires a mail connection, a
mailbox, a mail profile, and the Windows NT account you
used to start SQL Server. This Windows NT account needs to
be a domain account if you are using an Exchange server as
your mail server. It can be a local or domain NT account
if you are using POP3/SMTP mail server."

The following is extracted from BOL:
"Troubleshooting SQL Mail with Exchange Server"
Typically, errors that occur when starting a SQL Mail
session or sending mail from SQL Mail with Microsoft®
Exchange Server fall into these categories: permissions
problems and Exchange client setup problems. For more
information, see SQL Mail.

To troubleshoot problems with SQL Mail, complete these
steps:

Log on to Microsoft Windows NT® 4.0 or Windows® 2000 with
the user account that will be used for the MSSQLServer
service. This user account must be an administrator of the
local computer and a domain account.

Confirm that the Exchange Server client, Exchnge32.exe, or
the Microsoft OutlookT client, Outlook.exe, can connect to
Exchange Server and that e-mail can be sent. If using
Outlook, ensure that Outlook has been installed with the
Corporate or Workgroup option.

Confirm that the Exchange Server profile used does not
have a Personal Message Store (.pst). The Exchange Server
profile name should not be longer than 32 characters.

On the Services tab, confirm that the only services
available are Microsoft Exchange Server and Personal
Address Book, and then click the Delivery tab. Confirm
that the selection in the Deliver To box is the mailbox on
Exchange Server, which should have a name similar
to "Mailbox - <Friendly User Name>" (where <Friendly User
Name> is the name of the user who logged on to Windows NT
4.0 or Windows 2000in Step 1).

To run SQL Mail with Exchange Server, the MSSQLServer
service must be run under the same user account that
logged on in Step 1. In Control Panel, double-click
Services, select MSSQLServer service, and then click
Startup.

Confirm that the SQL Mail profile is correct. In SQL
Server Enterprise Manager, expand the server, expand the
Support Services folder, select SQL Mail, and then right-
click. Click Properties, and then on the General tab,
ensure that the profile name specified in the Profile name
box is correct. (The profile name must match the profile
name used in Step 3.) Click Test to verify that the
profile was set up correctly.

If SQL Mail fails to start (for example, gives you an
error indicating that the profile was incorrect), check to
make sure that Outlook Express is not set as the default e-
mail client. In Control Panel, double-click Internet
Options. On the Programs tab, verify that Outlook Express
is not in the e-mail combo box. If you have to change the
default e-mail client to a client other than Outlook
Express, you may need to stop and restart the MSSQLServer
service before verifying that SQL Mail can start with the
mail profile.
In some cases, a mail profile may get corrupted and SQL
Mail will not be able to use it. To correct the problem,
copy the profile to a different name, or re-create the
profile.

If the account used to start Microsoft SQL ServerT does
not have access to the Exchange server, you cannot use SQL
Mail. Test SQL Server access permissions to Exchange
Server by executing xp_cmdshell, which executes with the
same permissions as SQL Mail. Use the following command to
test connectivity to the server, assuming Exchange Server
is located on a computer named "MyServer".

xp_cmdshell "NET USE \\MyServer\IPC$"

If this command fails, Step 3 was not completed correctly.

BMF1
>-----Original Message-----
>Thanks for the response.
>
>Yes the services are logging on as administrator.
>
>Do you know if there is an issue using WORKGROUP instead
>of a domain?
>
>Thanks,
>Joe
>.
>



Relevant Pages

  • Re: SQL Mail
    ... > I'm having the same problem with sending mails from SQL. ... I've also went to SQL mail and set up a mail profile. ... > used to start SQL Server. ... > be a domain account if you are using an Exchange server as ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Mail configuration
    ... It isn't the Outlook client config that is giving me grief, it is in SQL. ... can connect with Outlook client to our Exchange server fine from the same ... admin user profile and mail profile from Outlook. ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL mail help
    ... It is very easy to setup and use and works 100x better then SQL Mail on ... Outlook Xp SP3 installed also ... SQL Mail Profile Name Outlook when I click on test button it is ...
    (microsoft.public.sqlserver.setup)
  • Re: Integrating SQLServer and Exchange
    ... This feature of SQL requires you install a mail client (ie outlook). ... Outlook is no advisable because SBS is also your Exchange server, ...
    (microsoft.public.windows.server.sbs)
  • Re: How to set up Exchange Profile for sql server mail?
    ... You don't need a profile "on the exchange server" you basically need to ... setup a Mapi profile on the SQL server that will allow you to connect to the ...
    (microsoft.public.exchange2000.development)