Database mail only works from SSMS not from a job

I have a script that returns its results via DB mail. When I run it from SSMS I get email, when I run it from a job I don't get email
Here is the error message from the DB mail log
Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2014-09-23T10:12:29). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
I've already enabled mail in SQL server agent.
1. Went into object-explorer, right-clicked on the SQL Server Agent, and selected properties.  Then
went to the Alert System page, and enabled the mail profile for the server agent. (you may already have this).
2. Then, went to "Database mail", right-clicked and selected "Configure
Database mail."  Selected "Manage profile security" and made sure my profile was set to public. THEN, and this is the kicker, clicked on the "Default Profile" field and set it to "yes". 
I'm using SQL server 2012 running on a Windows 7 system
Suggstions?

BOL: Configure SQL Server Agent Mail to Use Database Mail
Using Database Mail with SQL Server Agent
Look in Event Viewer & Agent log to find related messages.
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

Similar Messages

  • Printing only works from one computer

    I have an Epson Stylus C60 connected to the USB port on my Airport Extreme. There are two computers on the network, a PowerBook G4 and a MacBook Pro. Both computers connect to the network very reliably and have internet access. The problem is that the MBP cannot print to the connected printer. The G4 has always printed fine.
    The MBP sees the printer as a Bonjour printer, and I can add it to the printer list without problem. When I try to print, I get a message in the print queue that there is a communications error with the printer.
    In the airport configuration window, the printer is recognized and remote printing is enabled. Any idea why printing only works from the G4?

    Thanks for your help. Yes, the driver is a universal binary and the printer works great when plugged directly into the computer. I just can't figure out why it won't work over the airport.
    Any other ideas?

  • BPC Report emails only work from server (not client) - BPC v5.1

    Hi all.
    Hope someone might have seen something like this before.
    Basically, I setup our servers to send email from BPC about 3 weeks ago.
    (NB - If it makes a difference, we use Lotus Notes via a Domino server)
    The SMTP settings are all correct in BPC WebAdmin, the servers have been added to the allow list on the mail server and the port is open.
    Anyway, when I try to send mail from a client (using the Offline Report Distribution Wizard), I get the following error:
    "The transport failed to connect to the server".
    At SAP's suggestion, I ran a test by installing Office and a BPC client directly onto the Web Server.
    When I ran the wizard from the server, the email sent perfectly.
    The problem I have now is that although I informed SAP of the test outcome, I haven't heard anything back in about 3 weeks, and I really need to get the reporting email system up and running properly.
    Does anyone have any suggestions on what could be causing this?
    It's as though the system is telling the client to send the email itself, via the forwarding server, but this would mean allowing every user PC to access the mail server.
    Hope you can help, but thanks for looking either way.
    Craig

    Hi Ludovic
    The problem turned out to be mail server white-lists, due to the way that BPC sends emil.
    Although you setup the email account/profile on the server, it actually sends from the client PC of whichever user makes the email request.
    Our system is only configured to block all email requests with individual exceptions (ie a White-List).
    It needed the PC of every user who would need to send email from the BPC system to be added to the white-list.
    This is why it worked from the server, as we had added the server address to the list as part of the testing.
    Not reall y a BPC problem, more of an issue with functionality due to the method that it uses to send the messages.
    Hope that helps
    Craig

  • IPhone 4: lost contacts!  Restore from Backup only works for 30 seconds after restore job, then contacts disappear!

    The last time I backed my phone up, my contacts disappeard.  So I went back in and "restored from backup."   When the restore job finished, I opened up my "recent calls" and the names of my recent callers appeared for about 30 seconds and then they turned back into phone numbers.  No contacts appear in my contact list. 
    I called apple-care and all they're interested in is trying to get me to give them money. 
    I tried free support from this website but the person on the other end was clueless...utterly clueless....did not even understand what I meant when I uttered the phrase "restore from backup."  I had to take him through the process I had just gone through step by painstaking step, and all he could do was ask me why I didn't have my contacts.
    Is there anyone here whocan help with this? 
    PLEASE...help me. 

    Wjosten,
    You are absolutely correct, they are very much apart of the backup.  I lost all my contacts and did the same thing as you, restored a previous backup.  Upon completion of the restore, all my contacts were there.  Like you, after 30 seconds, mine too erased.  I tried to mess with iCloud with no luck, after re-establishing connection with either wi-fi or cellular, my contacts erased.
    I tried several times and was able to finally get my contacts copied over from the restore, here is how but only works if you have the restore available with the contacts still present.
    1. Restore from the previous backup (you must watch your phone because you have to be ready for the next step)
    2. When your phone restarts, immediately place your phone in "airplane mode" to stop it from connecting to the cloud and wiping away your contacts.  (Your contacts will remain until airplane mode is turned off)
    3. Within iTunes, search for and download "My Contacts Backup" which is FREE and does not need to connect to the Internet to work.
    4. Within iTunes, under the iPhone, navigate to the App's tab and find "My Contacts Backup" and click the install button to have it installed onto your phone.
    5. After installed, run the "My Contacts Backup" and follow the prompts.  Do not change any settings, they are already properly set up.  After it copies all the contacts, it is ready to e-mail out.  Email them to an address you can get on your phone.
    6. Turn off airplane mode (this will delete the contacts as said above but we have a backup.)
    7. Open the e-mail and click on the attachment.  Follow the short steps and all your contacts will re-populate.
    If you are like me, this fix also took care of my iMac and iPad contacts.  I have all 400 contacts back.  I hope this helps if you haven't found a fix or anyone that finds this page in the future.  While trying to fix this, I stumbled across software that was over $100.00 to fix this problem.  This is the free way
    FYI - I had the iPhone 5 running 6.0.2
    Good luck,
    Reed

  • IPhone 3GS: Push e-mail now only works on 3GS, not WiFi

    Greetings,
    Well, my iPhone 3GS (iOS 5.1.1, which it's been running for a long time) suddenly stopped receiving pushed e-mail from my Yahoo e-mail account (the only one of my accounts that offers push) over WiFi at home.  Now Push only works when I'm on 3G.  It used to work on both.  Any ideas?
    Thanks,
    DM

    Have you
    - restarted the phone?
    - made a hard reset? Simultaneously press the sleep/wake and the home buttons for 10-15 seconds until the device reboots (ignore the shutdown screen).
    - force quit the app? When in the app, press on the sleep/wake button until the shutdown screen appears, then press the home button until the app quits.

  • Nokia 6600 only works from one cell tower

    I have this weird problem with my phone where it will only work off one cell tower. Once I leave the coverage of that cell tower it will not work anywhere else.
    It started a few months ago and i'm not to sure why?
    The funny thing is it's the cell tower on top of my building at work, so when i'm at work it will work (calls/txt/etc) but as soon as I go home or even go to another city it will not.
    Any ideas?

    The first thing I'd recommend you do is to reset your phone, but I can't tell from the 6600's webpage what OS you're running so I can't give you instructions on how to do this.
    Have a look through your menus to see if you can find an option to reset to factory defaults, but please remember that doing so will wipe ALL data from your phone.
    If you wish to backup your data you can do so using the PC Suite application which you can find here :
    http://www.nokia.com/pcsuite
    Hope this helps.
    Regards,
    Edward

  • Applet only works from local server

    I developed an applet that has worked perfectly during my testing on my local apache server, but when I put it on my web host the applet won't load and the browsers lock up. I have tried it with a couple of browsers. I am at a serious loss to figure out why it wouldn't work from my web host.
    My class files are in a jar because I have several classes, and the jar works fine from my local server.
    Someone suggested that I do a stack dump. I put some code in the init method to dump the stack, but nothing changed. I have no idea where to find the stack dump from an applet. The browser doesn't have a window to display it (that I know of) and my applet certainly doesn't have a stack dump edit control.
    Does anyone know how I can proceed with this? I am usually very clever about tracking down bugs and problems, but this one has me stumped. I am not posting code here because I have tested all the code on my local server and it all works great, just not from the web host. If posting code would help find a solution, I will be happy to do that.
    Any help would be very much appreciated.

    I am using gFTP to upload it. Below is the status info that I get during the upload. It changes the permission to -rw-r--r--, which is the same as everything else on the server and makes sense to me. After the upload, there is a message about ASCII, but I am assuming it is just switching back to ASCII mode after the upload.
    Loading directory listing /public_html/mydir from cache (LC_TIME=en_US.UTF-8)
    PASV
    227 Entering Passive Mode (209,85,106,12,79,105)
    STOR /public_html/mydir/myjar.jar
    150 Accepted data connection
    226-File successfully transferred
    226 205.601 seconds (measured here), 44.19 Kbytes per second
    Successfully transferred /usr/local/apache2/htdocs/mysite/mydir/myjar.jar at 44.48 KB/s
    SITE CHMOD 644 /public_html/mydir/myjar.jar
    200 Permissions changed on /public_html/mydir/myjar.jar
    SITE UTIME 20071212173109 /public_html/mydir/myjar.jar
    500 UTC Only
    Loading directory listing /public_html/mydir from server (LC_TIME=en_US.UTF-8)
    PASV
    227 Entering Passive Mode (209,85,106,12,79,123)
    LIST -aL
    150 Accepted data connection
    226-ASCII
    226-Options: -a -l
    226 15 matches total
    Edited by: sawatdee on Dec 13, 2007 6:14 AM

  • Sound only works from one port

    My sound only works when I use the output port on the back of my computer, but I'd also like to use the one at the front of my computer for convenience. What setting am I supposed to change to do this? Here is some information about my system.
    ~ > cat /proc/asound/version
    Advanced Linux Sound Architecture Driver Version 1.0.24.
    ~ > aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: PCH [HDA Intel PCH], device 0: VT1705 Analog [VT1705 Analog]
    Subdevices: 0/1
    Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 2: VT1705 HP [VT1705 HP]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    My guess is that I want to use device 2 of card 0, so I tried creating a ~/.asound.rc containing
    defaults.pcm.device 2
    but this didn't seem to do anything.

    The "Front" channel isn't the same thing as the front panel. From the ALSA wiki:
    "Front, Surround, Center, LFE (subwoofer) and Side (these are the names of the channels with Intel HD Audio, they may vary with different hardware)."
    How many sounds cards do you have?
    [dspider@arch ~]$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: NVidia [HDA NVidia], device 0: HDA Generic [HDA Generic]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    [dspider@arch ~]$
    What are the other HDMI devices? The video card?
    And have you tried googling the problem?
    http://ubuntuforums.org/showthread.php?t=1462288

  • Mouse scroll wheel now only working from right to left scroll...

    After update yesterday (10/15) on my MacBook Air my wireless mouse (Microsoft Wireless Laser Mouse 6000) that has worked forever will not scroll up and down.  Trying it In excel it will scroll right and left when I use it, but everything else (browsers, word docs) that have no real right left scrolling functionality there's no effect.  Looking in Mouse options there's no option to change the scrolling orientation from rigth/left to up/down... help please.

    setComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT)

  • Yahoo mail only works on 3G and not on wifi. It is the same for iphone

    Yahoo cannot download  messages on wifi. It only works on 3G

    Seems to work fine on my home wifi, but not on my office wifi.  Before the upgrade, it worked fine on my office wifi. 
    Must be something subtle.  What kind of network issue where you thinking about?  I can perform more tests.
    Otherwise, things worked fine on my office wifi; I was able to access Yahoo email via it's web-app for iphone.  Able to browse web pages, etc. 

  • My ipod only works from 1 side of my headphones

    My iPod headphone jack only works on 1 side of the headphones but not both sides of the headphones. I try every headphones my friends have and my iPod is causing this problem. How can I fix the headphone jack inside my iPod??

    Have it replaced.  Either send it into Apple for replacement for a flat fee or send it to a third party repair comany to actually replace the part of for you at a cheaper cost.
    Here are Apple's pricing options.
    http://www.apple.com/support/ipod/service/prices/
    B-rock

  • Notification Plug-in only working in IE (not Firefox or Chrome)

    Just in case anyone else encountered this ...
    I downloaded and installed the Dynamic Action Plug-in, Notification,
    from http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html.
    I imported into Shared Objects plug-ins for an application, created a dynamic action using this plug-in,
    and it works great. In IE only (IE 8). When I run the application from Chrome or Firefox (3.6.13),
    the notification does not display.
    When I run the demo notification application in firefox or chrome, the notification works - http://apex.oracle.com/pls/apex/f?p=654321:401:0
    I can not find any information specifically on browsers.
    I use APEX 4.0.1.00.03 in Oracle 11.1.0.7 and develop on Windows 2003 server.
    I do use javascript (calling htmldb_Get) to get a value from the database to display in the Notification,
    so I suspect the problem may be there.
    Any ideas why only IE works would be appreciated. Is there any place in APEX I needed to specify browsers?
    Thanks,
    Wayne

    I stripped out all the local database access and hardecode a value for this problem. When you click the button "Check Employee's Classification", it calls a javascript function in the HTML Header called checkClass. That changes the item displayed in the notification and fires the dynamic action, Employee Class. Works great in IE, but that's it. I suspect it's the javascript that firefox or Chrome doesn't recognize.
    function checkClass(lnum)
    //alert(lnum);
    // force a "change" for dynamic action to fire - set to empty, then change
    $x('P1_CLASS_DESC').style.visibility = 'visible';
    $x('P1_CLASS_DESC').focus();
    $x('P1_CLASS_DESC').value = "";
    $x('P1_CLASS_DESC').blur();
    $x('P1_CLASS_DESC').style.visibility = 'hidden';
    // below won't work on apex.oracle.com - comment out
    // var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=checkClass',0);
    // get.add('P1_LNBR',lnum);
    // gReturn = get.get();
    //alert(gReturn);
    $x('P1_CLASS_DESC').style.visibility = 'visible';
    $x('P1_CLASS_DESC').focus();
    // origin - not for apex.oracle.com $x('P1_CLASS_DESC').value = gReturn;
    $x('P1_CLASS_DESC').value = "Test for why this only works in IE";
    $x('P1_CLASS_DESC').blur();
    $x('P1_CLASS_DESC').style.visibility = 'hidden';
    }

  • Iphone 3G, Exchange mail - can't send new mail only works by reply

    Before upgrading from 2.0 to 2.0.2 all worked like a charm with Exchange mail. Now I am not able to send new mail from iphone using Exchange account. When I try to do so, a send bar appears shortly, but no message is sent. When trying to forward a note from Notes application using exchange account, also applications closes down automatically.
    The only viable option to send mail via Exchange is by replying to someone's message.
    How to deal with this?
    I have tried to delete all accounts on iphone and re-establishe them. Doesn't work.

    Discovered, that it is a problem connected to Contacts. If you are using Contacts or typing a new email address, New mail won't go.
    If you however browse Exchange address book and select a person to send email to, that will work.
    Apple what happenedin 2.0.2?

  • Sending mail: only old addresses prompted (not in 'Prev. Recipients')

    Often, not always, after in Address Book I update an email address in sets of addresses I send mail to; and even if I delete from 'Previous Recipients' the shorthand name I use, when I go to add that set's name to an email, it only prompts the old version of the set.
    Since there are typically 10 or so email addresses, I would love to know how to get Mail to recognize the updates I make in my A.B. sets, instead of editing the prompted old version every time!
    I usually don't bother creating groups of AB cards--typically I put several addresses into a single A.B. card and give it a short name.

    BOL: Configure SQL Server Agent Mail to Use Database Mail
    Using Database Mail with SQL Server Agent
    Look in Event Viewer & Agent log to find related messages.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • The type of the database table and work area are not Unicode convertible

    ***Data declaration
    TYPES : BEGIN OF t_zle_lagerplanung,
                       SEl, "stores which row user has selected
                       kdauf TYPE zle_lagerplanung-kdauf,
                       kdpos TYPE zle_lagerplanung-kdpos,
                       etenr TYPE zle_lagerplanung-etenr,
                       papiermaschine TYPE zle_lagerplanung-papiermaschine,
                       runnr TYPE zle_lagerplanung-runnr,
                       prio TYPE zle_lagerplanung-prio,
                       werk TYPE zle_lagerplanung-werk,
                       durchmesser TYPE zle_lagerplanung-durchmesser,
                       breite TYPE zle_lagerplanung-breite,
                       anzle TYPE zle_lagerplanung-anzle,
                       lgpla TYPE zle_lagerplanung-lgpla,
                       lgtyp TYPE zle_lagerplanung-lgtyp,
                       art TYPE zle_lagerplanung-art,
                       anzhoehe TYPE zle_lagerplanung-anzle,
                       fa TYPE zle_lagerplanung-fa,
    END OF t_zle_lagerplanung.
    DATA : it_zle_lagerplanung TYPE STANDARD TABLE OF t_zle_lagerplanung INITIAL SIZE 0,
                wa_zle_lagerplanung TYPE t_zle_lagerplanung.
    Here I am getting the data in internal table by using thiis select statement.
    SELECT kdauf kdpos etenr papiermaschine runnr prio werk durchmesser breite
                  anzle lgpla lgtyp art anzhoehe fa
    FROM    zle_lagerplanung INTO CORRESPONDING FIELDS OF TABLE it_zle_lagerplanung
    WHERE  kdauf IN s_kdauf
    AND       KDPOS IN s_kdpos
    AND      werk = p_werks.
    But while updating the particular field in zle_lagerplanung using this statement
    UPDATE zle_lagerplanung from table it_zle_lagerplanung.
    it is giving syntax error
    "The type of the database table and work area (or internal table)
    "IT_ZLE_LAGERPLANUNG" are not Unicode convertible. "
    Could any one help me out how to resolve this problem....
    Thanks in advance

    Dear Shayamal,
    XXX....are not Unicode convertible
    This  error comes while inserting or updating database and the fields are not matching between  data base table and structure .
    Check you fields of data base table and  "zle_lagerplanung" and struture "it_zle_lagerplanung" . There fields must match.
    thanks and regrds,
    Anup Banerjee

Maybe you are looking for

  • Connecting mac ibook to home network

    My Windows 7 laptop is working with my Cisco router.  REPEATEDLY trying to connect a mac ibook, but it asks for password.  I enter the one that is given for windows computers, but it won't work with the mac.  I can only connect if I run wire from rou

  • IPhoto doesn't ask to delete imported photos

    For years, iPhoto on my MacBook Pro always asked if I wanted to delete the photos from the camera after importing them. For the last year or so, iPhoto 11 didn't always do that with my previous camera, although it sometimes did. Since I got the new C

  • Trial version of Pre 5.5 doesnt have Mpeg2-dvd... why?

    Hello, I've been using various editing software for a while making silly home movies and the like but I was looking to get some real clout behind me and push for a job in editing or maybe start up editing old home movies.  I've used adobe premiere in

  • Camera zoom not working on 3g 3.0 upgrade

    i upgraded to 3.0 and then downloaded camera zoom app it do's not work apple said i to delete it and redownload it if that do's not work contact the maker he said they put a update out but apple needs to prove it frist . that can i do???

  • Why do I have plymouth in boot?

    Hello, I just upgraded an old system whats only supposed to run as a server so only uses textmode. After fixing all the problems the upgrade caused, it stopped booting because it wanted to spawn /bin/plymouth: no such file or directiory Where does th