Can't send Email: Error 500 or 403 when trying to use SP.Utilities.Utility.SendEmail

Hi all,
I am getting a Internal Server 500 error when trying to send an email using the SP.Utilities.Utility.SendEmail in my SharePoint Online App. It is worth noting that I am working from a custom .aspx page that does not inherit from the Masterpage, and using
AngularJS (thus the $http).
If I change the urlTemplate to use the hostWeb instead of the AppWeb, I get a 403 forbidden. Is there a library I need to include since I am using a custom.aspx page instead of the default.aspx page that comes when creating an App?
Any clues?
 var appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
 var urlTemplate = appweburl + "/_api/SP.Utilities.Utility.SendEmail"; $http({
contentType: 'application/json',
url: urlTemplate,
type: "POST",
data: JSON.stringify({
'properties': {
'__metadata': {
'type': 'SP.Utilities.EmailProperties'
'From': [email protected]',
'To': {
'results': ['[email protected]']
'Body': 'Hello',
'Subject': 'remember'
headers: {
"Accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
}).success(function(data, status, headers, config) {
$scope.data = data;
alert("Email Sent!");
}).error(function(data, status, headers, config) {
$scope.status = status;
alert("Email FAil!");
Personal Blog: http://thebitsthatbyte.com

I've got it working in SharePoint Online/SharePoint App using the following. Note that I am using AngularJS:
function sendEmail() {
var appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
var urlTemplate = appweburl + "/_api/SP.Utilities.Utility.SendEmail";
$http({
contentType: 'application/json',
url: urlTemplate,
method: "POST",
data: {
'properties': {
'__metadata': {
'type': 'SP.Utilities.EmailProperties'
'From': '[email protected]',
'To': {
'results': ['[email protected]']
'Body': 'Good Day from the App. Dont reply if this was received.',
'Subject': 'App says hello and is awaiting your review'
headers: {
"Accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
}).success(function(data, status, headers, config) {
console.log("Sent!");
$location.path('/');
}).error(function(data, status, headers, config) {
console.log("fail");
function getQueryStringParameter(param) {
var params = document.URL.split("?")[1].split("&");
var strParams = "";
for (var i = 0; i < params.length; i = i + 1) {
var singleParam = params[i].split("=");
if (singleParam[0] == param) {
return singleParam[1];
Personal Blog: http://thebitsthatbyte.com

Similar Messages

  • Can we send email to a member as when he is added to the Oppty Team?

    Can we send email to a member as when he is added to the Oppty Team without any condition by picking the email id from the User object?
    I mean just send an email to the new user when it is created in the oppty team
    I think about using workflow,record type 'Opportunity Team', trigger event 'When new record save'
    but the send to email only have 2 options, one is Specific user,the other is specific email address, no send to email id which come from the user object.
    do you have any suggestion?
    Thanks
    Amanda
    Edited by: user12170878 on Feb 1, 2010 7:08 AM

    I try to use JoinFieldValue('<User>',[<UserId>],'<EMailAddr>') in the Specific Email Address, no matter the new created user or the user which I log in, both email Account don't receive any email
    Regards
    Amanda

  • Using a wi fi not mine can't send email error message says my email address not recognised

    I am using my IPAD in UK. (friend's wi fi) from Australia
    Can receive email ok
    Have entered his Outgoing address mail.btinternet.com.
    Can't send emails.  Error message says  server does not recognize my address
    What do I do??

    Thanks for the response. Unfortunately, things have gotten progressively worse now in another direction. After I posted this, I shut down my computer to go to work. It had to "rebuild" the filevault sparseimage to recover space.
    Now when I restarted it, I am missing things from my dock, ? marks are in their place, all of my preferences have been set to some default AND this is the biggie - I have no mail accounts whatsoever. When I click on Mail, it asks me if I want to establish a new account. It looks like the FileVault action has totally screwed up my system.
    I tried rebuilding the permissions as recommended above using safe boot. Didn't help. I am now trying to repair the FileVault sparseimage as recommended elsewhere. I think I now see what the problem might be. I have two different sparseimages for the same account with the only difference is that a 1 is appended to the second one. Unfortunately I can't tell which it is. I have a feeling I should repair the 1st one (without the suffix 1). It must not be able to open that and hence that is why it made a second one.
    Any other help anyone?
    Nick

  • I can't send email in Thunderbird and I have tried all suggested fixes I can find!

    I moved Thunderbird from my old MacBook Pro to a new MacBook Pro (I have done this before with no problems).
    I updated Thunderbird on both laptops before I did this - to version 31.0
    The new machine's running Mavericks 10.9.4
    I started to notice intermittent problems with sending email - this seemed to free up when I opened up my BT email account (the account that 'feeds' Thunderbird) and then resent the email in Thunderbird.
    This 'fix' has now stopped working and all I continually get when trying to send is the message:
    'Send Message Error
    The message could not be sent because connecting to SMTP server mail.btinternet.com failed.
    The server may be unavailable or is refusing SMTP connections.' (etc.)
    I checked with both Mozilla and BT forums/help pages, then went to Thunderbird>Tools>Account settings>Outgoing Server(SMTP)>Edit
    I then changed the settings to those recommended by both BT and Mozilla:
    Server Name: mail.btinternet.com
    Port - 465
    Security - SSL/TLS
    Authentication - normal password
    User Name - (my user name)
    I also tried many variations (including the original settings)
    Server Name: mail.btinternet.com
    Port - 587
    Security - none
    Authentication - password transmitted insecurely
    User Name - (my user name)
    I tried deleting my password and then doing the above all again.
    I tried turning the router off and back on and doing the above all again.
    Nothing - apart from not being able to send email Thunderbird's working fine with incoming, I really think I've tried everything I can. Can I delete my prefs - will this help? Is there anything I've missed? I've wasted 4 hours and it feels like 4 days!
    Any help would be greatly appreciated.

    Error message as above and below:
    'Send Message Error
    The message could not be sent because connecting to SMTP server mail.btinternet.com failed.
    The server may be unavailable or is refusing SMTP connections.' (etc.)
    BT won't deal with this - they redirect me to a 'partner' who want to charge to discuss the problem. Nice, eh!

  • Error 500 is displayed when trying to create an RNA detection policy

    When I attempt to create an RNA detection policy, I receive the following error message on the web interface of my Sourcefire 3D System:
    Error 500: Internal Server Error

    If you install a FireSIGHT license on a 3D System running software version 4.10, it may display an Error 500 message, because a FireSIGHT license is incompatible with software version 4.10.x. In order to install a FireSIGHT license, you appliance must be running software version 5.0 or greater.
    In order to fix this Error 500 message when attempting to create an RNA detection policy, please follow the steps below:
    Step 1: Log into the web interface of the Defense Center, and navigate to Operations > System Settings > License.
    Step 2: Look for an unknown license type (FireSIGHT) as the following figure:
    Step 3: Delete this unknown license type using the trashcan icon labeled Delete User-added image.
    Step 4: Activate RNA and or RUA feature licenses, Operations > System Settings > License > Add New License, from your product activation keys.
    Note: If you do not have RNA/RUA activation keys, please contact your Sales Representatives.
    Step 5: Once activated, you should be able to see a valid license type under the License page as displayed in the figure below.
    Step 6: You may now create an RNA detection policy from Policy & Response > RNA > Detection Policy > Create Policy page without any error.

  • Hello, I'm getting the follwing error in my logs when  trying to use javabeans on a nes 4.0 sp3 with j2se

    JSP compilation error: java.lang.Exception: JSP parse error (line 66) - Incomplete tag ending of /jsp:useBean, stack: java.lang.Exception: JSP parse error (line 66) - Incomplete tag ending of /jsp:useBean

    Use the following steps to fix the problem:
    Add the following line to the JSP:
    <%@ page import = "BeanName" %>
    The BeanName is the name of the bean you would like to use. This name should not include the .class extension.
    Set the classpath for Java in the server so that it includes the directory where the JavaBean is located.
    From the Admin server, click the Servers tab, Manager Servers.
    Select the server instance that you would like to configure.
    Click Manage.
    Click the Servlets tab, Configure JVM Attributes.
    At the end of the classpath field, add the path to the directory where
    your bean is located.
    Note: Remember to separate statements in the classpath by semicolons.
    Click OK.
    When prompted, click Save and Apply.
    Completing the above steps will enable the server to find the JavaBean that
    you are trying to use in a JSP.

  • I just upgraded Thunderbird and now I can't send emails: error message reads "file size too large" which is not the case

    error message reads "size of message exceeds temporary size limit of server"; The message is 1 word long so that's obviously not the problem;
    I upgraded automatically to the latest version on 7-16-14 and that's when the problem started

    The size of the message you are trying to send exceeds a temporary size limit of the server. The message was not sent; try to reduce the message size or wait some time and try again. The server responded: 4.5.3 Your message has too many recipients. For more information regarding
    4.5.3 Google's sending limits, please visit:
    4.5.3 http://support.google.com/mail/bin/answer.py?answer=22839 u5sm10938190obv.10 - gsmtp.
    I get this message when attempting to send a message to my distribution list. Problem started today. Single recepients work okay.

  • 1.Can't sync music error. 2. When trying to update: 1403 corrupted error?

    For some reason, my iPhone was "freaking out" when I was trying to access its music library earlier today (constant flickering back forth between different songs by a single artist). In the end, all the music from my phone was deleted . Then when I was trying to transfer music, I got an error from iTunes when I try manually "drag n drop" to sync new music: "the iphone cannot be synced. an internal device error occurred". Any advice? I'm running iOS 6.1.3, when I try to restore, I got error: "The iPhone "iPhone" could not be restored. An unknown error occured (-1)".

    Errors related to third-party security software
    Error 2, 4 (or -4), 6, 1000, 9006
    Follow Troubleshooting security software. Often, uninstalling third-party security software will resolve these errors.
    There may be third-party software that modifies your default packet size in Windows by inserting a TcpWindowSize entry into your registry. Your default packet size being set incorrectly can cause these errors. Contact the manufacturer of the software that installed the packet size modification for assistance or follow this article by Microsoft: How to reset Internet Protocol (TCP/IP).
    Verify that access to ports 80 and 443 are allowed on your network.
    Verify that communication to albert.apple.com or photos.apple.com is not blocked by a firewall, or other Internet security setting.
    Discard the .ipsw file, open iTunes and attempt to download the update again. See the steps underAdvanced Steps > Rename, move, or delete the iOS software file (.ipsw) below for file locations.
    Restore your device while connected to a different network.
    Restore using a different computer.
    Error -1
    Attempt to restore your iOS device two more times. If the issue is still unresolved, the device may need service.

  • Help! I am getting: Quicktime error -50...when trying to use the "Share" and "Send to Compressor" function. I need to export my show! Thanks for your suggestions! (using FCP7)

    Help!  I am trying to export my show and commercials from the timeline. Both Share and Send to compressor are not working.
    Its starts compressing then I get Failed"Quicktime Error -50". I appreciate any suggestions.
    SYSTEM INFO
    Model Name:          Mac Pro
      Model Identifier:          MacPro5,1
      Processor Name:          Quad-Core Intel Xeon
      Processor Speed:          2.4 GHz
      Number Of Processors:          2
      Total Number Of Cores:          8
      L2 Cache (per core):          256 KB
      L3 Cache (per processor):          12 MB
      Memory:          10 GB
      Processor Interconnect Speed:          5.86 GT/s
      Boot ROM Version:          MP51.007F.B00
      SMC Version (system):          1.39f11
      SMC Version (processor tray):          1.39f11

    First try exporting a self-contained movie from FCP, the using the resulting file in Compressor.  To do it, go to File->Export->QuickTime Movie (do NOT use QuickTime Conversion).  In the export window, check the self-contained option but do not "recompress all frames."
    Once the export is finished, launch Compressor then use the self-contained file as the source.  If that fails, you may want to try using theis: http://www.digitalrebellion.com/compressorrepair/
    -DH

  • Confusing error message from iTunes when trying to use AirTunes

    Hello everyone,
    I figured since other folks might run into this issue that it's worth posting about, since it's both annoying, irritating, and none of the Apple support hints address it properly ...
    If you're one of those folk like me who has to deal with corporate proxies for pretty much everything while at work, but don't have any local proxy issues at home, you might use something called Proxifier.
    Be aware that the way it works (as a kernel module, intercepting socket calls and transparently mapping them through your defined proxy) will screw up iTunes unless you explicitly unproxy it (it implicitly proxies everything except what you tell it to).
    The error message I kept getting was "The remote speaker is not compatible with your version of iTunes", and after spending 20 minutes or so with ktrace, watching socket calls, I gave Proxifier a poke and told it to stop proxying iTunes. Lo, and behold, AirTunes magic returned.
    So if you use both of these applications, be wary of the interaction between the two, as it can be confusing and produce undescriptive and unhelpful error messages!
    cheers,
    Klaus

    Hi Mars-
    It sounds like your NI-DAQ installation may have become corrupted. I would suggest uninstalling and reinstalling the DAQmx 7.4 driver to correct this problem and ensure that you're up to date. This download is available here: NI-DAQ 7.4
    If the problem persists you may want to uninstall and reinstall LabVIEW and then NI-DAQ in that order. The error message will usually give an indication as to which VI the error occurred in. Please let us know which VI is failing if you're unable to avoid the error with these suggestions.
    Have a good day-
    Tom W
    National Instruments

  • 'Cannot obtain error message from server' when trying to use ODBC

    Post Author: Grant C
    CA Forum: Data Connectivity and SQL
    Hi, I'm developing some reports using Crystal XI on my local PC, using an Oracle 10i back end on a separate server.  The SQL for the report is in a method in an oracle package.
    When I set the datasource location, selecting 'Oracle Server' then entering the details works fine, and the report runs.  However, when I try to use an ODBC connection I get the following error:
    Database Connection Error: 'Cannot obtain error message from server.'
    The ODBC link is set up as a System DSN, which works fine when I test it.  I think I need to use ODBC as some of the reports (which I inherited) seem to fail when run on the Crystal Server, and it seeme to be the ones set up with ODBC which work.
    Any thoughts?  Thanks.

    Hi Mars-
    It sounds like your NI-DAQ installation may have become corrupted. I would suggest uninstalling and reinstalling the DAQmx 7.4 driver to correct this problem and ensure that you're up to date. This download is available here: NI-DAQ 7.4
    If the problem persists you may want to uninstall and reinstall LabVIEW and then NI-DAQ in that order. The error message will usually give an indication as to which VI the error occurred in. Please let us know which VI is failing if you're unable to avoid the error with these suggestions.
    Have a good day-
    Tom W
    National Instruments

  • NPiExec Error when trying to use LanDesk remote utility.

    Im getting an"NPiExec Error" occurs when I run LanDesk from firefox window in ver 6.5.8 (Landesk is a remote control utility). At first it prompted to install 3 plugins, which I did (ENURCSetup.exe, ENUssh.exe and Upsftp.exe). Now it only returns with a small message box, titled: NPiExec Error - and in the box it says: The Operation Completed Successfully and has an OK button. I click OK - nothing happens. Of note: LanDesk through IE works fine but I want to use Firefox as my default browser.

    It behaves different i IE than in Firefox. In IE it asks me to login again when I press the feedback link, but when I try to save my comment it get the same error.
    Regards Pete

  • HT4863 I have an error message coming up when trying to send an email which says 'sending the message failed because you're exceeding the limit' can anyone help me to resolve this please

    I have an error message coming up when trying to send an email which says 'sending the message failed because you're exceeding the limit' can anyone help me to resolve this please

    Try reentering the password in your iCloud mail settings.

  • Thunderbird can't send email to addresses in Address Book because of formatting error

    My Thunderbird can't send email to an address picked from the Address Book. It gives the following error:
    "An error occurred while sending mail. The mail server responded: 5.1.1 <"name@telconame"@telco.com> Unknown recipient. Please check the message recipient "name@telconame"@telco.com and try again."
    You can see that Thunderbird has garbled the name/address pair: "name@telconame"@telco.com" so that it's unworkable.
    If I type the email address by hand, it sends the email OK. But it can't retrieve an address from the Address Book without garbling the name/address pair. Win 7, TBird Version 32.0; it's the same in SafeMode.
    Any ideas?

    Make two Address Book entries for him; one for each of his e-mail addresses. Make a new Address Book group and put both of his entries in it. When you send him an e-mail just type in the name of the group in the To: field.

  • Just got an Iphone - Receives email but can't send email to anyone ( POP ). Error Message : "The recepient ... was rejected by the server because it does not allow relaying."

    Just got an Iphone - Receives email but can't send email to anyone ( POP ). Error Message : "The recepient ... was rejected by the server because it does not allow relaying." Please help............

    Hi johnnytoo!
    I know it's aggravating when you need to send an email and it doesn't go through! I have a link that provides step by step information from Apple's website that should resolve this for you.
    http://support.apple.com/kb/TS3899
    Please post back with your results, and have a good day!
    Christina B
    VZW Support
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • Bookmark through CLIENT_OLE2

    Hello Seniors/Guru/experts we have custom built oralce application (forms 11g). Here is the detail: we have word template(employee record.dot) store in database through blob. And each template have bookmark .i.e. "Emp name". We are able to call that

  • XSLT Mapping and Graphical Message Mapping

    Hi, Can any one let me which is advatageous and why or let me know where I can find docs. Thanks In Advance. Yaseen

  • Large bullets

    Hi, I am using RH 7.0. My bullet styles use the default discs and squares. In the WYSIWYG editor, the bullets are small and "elegant". However in the preview and in the actual CHM file they are very big, the size of the text, and really very ugly. Is

  • XML/LoadVars help

    Hi. I need some help trying to load indivual strings of text from an external file. example: I have a movie that navigates from frame to frame. on each frame I'd like a line of text to load into the movie. When the user navigates to the next frame th

  • Ical wont stop asking for password

    hey guys, my iCal will not stop asking for my password and it is driving me nuts, it means i cant use the iCal at all which is very annoying as before it started tripping out i relied heavily upon it. is there a fix that anyone knows of out there to