• yeah, digging for stuff is turning into a pain...

    just going for the account info, for example, the password associated to the username used for SMTP AUTH command appears to use something a bit beyond my knowledge;

    i can find the username in select * from sys.credentials, but the password for reverse engineering...hrmmm. sp_helptexting each proc is sending me deeper and deeper into the rabbit hole....

    SELECT '

    --CREATE Account [' + m.name + ']

    EXECUTE msdb.dbo.sysmail_add_account_sp

    @account_name = ''' + m.name + ''',

    @description = ''' + m.description + ''',

    @email_address = ''' + m.email_address + ''',

    @replyto_address = ''' + m.email_address + ''',

    @display_name = ''' + m.display_name + ''',

    @mailserver_name = ''' + s.servername + ''',

    @mailserver_type = ''' + s.servertype + ''',

    @port = ''' + s.port + ''',

    @username = ''' + c.credential_identity + ''',

    @password = ''x'',

    @mailserver_name = ''mail server address''

    @use_default_credentials = ''x'',

    @enable_ssl = ''x'',

    ' AS CMD

    from sysmail_account m

    LEFT OUTER JOIN sysmail_server s

    ON m.account_id = s.account_id

    LEFT OUTER JOIN sys.credentials c

    ON s.credential_id = c.credential_id

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!