Custom email not sending to external user

Hi All,
I am trying to send email to user through custom C# code, its working fine until i send to external user such as gmail etc. How to fix this? Thanks in advance!

Hi
Sam
First
 check whether you configure outgoing e-mail settings, if not, please refer to the following article to configure outgoing e-mail settings. After determining which SMTP server to use, the SMTP server must be configured to allow anonymous access and to
allow e-mail messages to be relayed.
Configure
outgoing e-mail settings (Office SharePoint Server)
http://technet.microsoft.com/en-us/library/cc263462.aspx
For
sending mail to external user  your SMTP server must have Internet access or it must be able to relay authenticated e-mail to a server that has Internet access. 
 Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been
helpful for you.

Similar Messages

  • SharePoint custom email not shooting, How to fix this?

    Hi All,
    I trying to send custom email from C# to external user, but mail is not going. But sending to same domain users and find these exceptions in log;
    "Type: SmtpFailedRecipientException, Exception Message: Mailbox unavailable. The server response was: 5.7.1 Unable to relay"
    "Exception thrown from business logic event listener: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay     at System.Net.Mail.SmtpClient.Send(MailMessage message)    
    at ChangeControl3_Nov.eGA_Utility.SendmailnoAttach(String To1, String subject1, String Body1, String frommail1, String FS) in c:\Users\acpbsdt\AppData\Local\Temp\2\Vsta\6c9090f9672f4fba89c20855a223734b\eGA_Utility.cs:line 288     at ChangeControl3_Nov.FormCode.SendBothCTRL256_5_Clicked(Object
    sender, ClickedEventArgs e) in c:\Users\acpbsdt\AppData\Local\Temp\2\Vsta\6c9090f9672f4fba89c20855a223734b\FormCode.cs:line 417     at Microsoft.Office.InfoPath.Server.Util.DocumentReliability.InvokeBusinessLogic(Thunk thunk)     at Microsoft.Office.InfoPath.Server.SolutionL...
    08e3e29c-259c-60b9-fdb2-5829cbd6a566"
    Any idea? Thanks in advance!

    Hi,
    Please check the links below:
    The server response was: 5.7.1 Unable to relay -- Help Please
    http://forums.iis.net/t/1165876.aspx?The+server+response+was+5+7+1+Unable+to+relay+Help+Please
    Mailbox unavailable. The server response was: 5.7.1 ... we do not relay
    http://www.codeproject.com/Questions/94257/Mailbox-unavailable-The-server-response-was
    If you want to customize code for send Mail in SharePoint using C# .net code, here is a blog for your reference:
    https://technologykhabar.wordpress.com/2013/06/19/custom-code-for-send-mail-in-sharepoint-using-c-net-code/
    The code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Net.Mail;
    using Microsoft.SharePoint.Administration;
    namespace SendEmail
    class Program
    static void Main(string[] args)
    SPWebApplication webApp = SPWebApplication.Lookup(new Uri("https://serverName/"));
    MailMessage mail = new MailMessage();
    mail.From = new MailAddress("[email protected]");
    mail.To.Add("[email protected]");
    mail.Subject = "Subject Test";
    mail.Body = "Body Test";
    // SmtpClient class sends the email by using the specified SMTP server
    SmtpClient smtp = new SmtpClient(webApp.OutboundMailServiceInstance.Server.Address);
    smtp.UseDefaultCredentials = true;
    smtp.Send(mail);
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Send email from SAP to External User ..........

    hiii
    <b>Is it possible to send mail from SAP to External user??????if possible does BASIS people had to do something???</b>
    I want to send the email from sap to external user([email protected]).My mail will consist of some changes made in production order(CO03). for which i had created the BADI. That part is over now i want to send the mail.
    <b>I got many sample programs in sdn but when i enter the email address it execute but mail is not sent.....I want to know by just executing Zprogram mail will be sent or there is some role for BASIS also..............</b>
    Thanking you.
    Regards.

    There is a transaction called SCOT that needs to be configured
    http://www.sap-basis-abap.com/sapbs035.htm
    http://www.sap-img.com/basis/basis-faq.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/d925bf4b8a11d1894c0000e8323c4f/frameset.htm

  • Microsoft Exchange sending emails not receiving for a user

    I have a Windows Server 2003 Enterprise Edition SP2 we are using as our exchange server. One user that has been working fine for years all of sudden can send emails but not receive any emails.  I have checked outlook settings, use the HTML direct connection
    to the user in the same network I can access his email and send emails from either source but not receiving emails from anywhere. Can someone please advise thanks
    We have many users working just fine including myself. Just one of the users which had been working fine for years all of sudden stopped receiving emails. 

    Hi Luis,
    " use the HTML direct connection to the user in the same network I can access his email and send emails from either source but not receiving emails from anywhere. "
    1) Do you mean that you logged on the mailbox via OWA but still can not see the received emails ?
    2) Just only this user , the others are working well ?
    3) Did try to send an email from the same server to this issue account ,still can not receive it ?
    4) Please try to send an email from an "external" mailbox , if the email can not achieve the target mailbox , the "external " mailbox should receive an NDR email  come with  some useful infomation .
    Also please open event log to check if there is any useful infomation .
    As for this issue , you may get more accurate assistance in the exchange forum:
    http://social.technet.microsoft.com/Forums/exchange/en-US/home?category=exchangeserver
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SAP BPC 10.0 Netweaver : Workstatus email notification sender is the User how to change it ?

    Hi Gurus,
    I've just set up email notification for Workstatus. I works fine but I've noticed something that won't be accepted by my customer :
    I Had created a BPC Service User SMAIL to send email notification. But it is useless since the email notification sender is always the user who actually made the workstatus change.
    This is very strange because this means that SAP can send emails IN NAME of Users. By default the email used is the user's email set up in SU01 and if the user has no email the sender mail adresse is : USERID@DEFAULTHOST
    Default domain defined in SCOT transaction for SAPCONNECT.
    I think that this situation raises a security breach ; to my opinion SAP should not be able to send emails in the name of users.
    Do you have any idea to change this situation in order to make all notification emails send by one unique System User as BPCSERVICEMAIL for instance.
    Thanks in advance for you help.
    Vincent.

    Hi JW,
    The answer to your question #2 is that we won't have SSIS packages in BPC7NW since all SQL server based functionality won't be there in Netweaver version. If you use migration tools to migrate from BPC5.x to BPC7NW, it can convert SSIS packages. However any custom SSIS code would have to be converted manually. For more information, please read Ryan's blog at SAP's definitive strategy for planning technologies moving forward: What's the word on BPC, BI-IP and SRC?
    Regards
    Pravin

  • Email not sending in Business One

    Hi Experts,
    I have a customer that is trying to email using B1 and the emails just sit in the outbox and don't send. They are not receiving an error and it is only on one user and one computer in the system. If the user that is trying to send the email logs in under a different user they are able to send email just fine. Both users are super user. Any help is much appreciated.
    Best Regards,
    Jeff Haldeman
    Support One

    Jitin thanks for the quick response! I have checked for these errors. There are no SBOMAIL errors on the customers machine, but on the server I have found this error: "The description for Event ID ( 62 ) in Source ( SBOMail ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Faild to connect to SMTP server." The last time this error came was on December 4th and the issue happend this morning also. If you are able to help further that would be appreciated thanks again!
    Jeff Haldeman
    Support One

  • Emails not sending, "stuck" in the outbox and no error message

    I have been trying to send emails for a few days now and they will not send. They go to the outbox file and then the don't leave. There is no error message and my POP account, .mac account, and the smtp.mac.com are all working correctly. I can still receive mail. The emails don't get sent to the draft file.

    What does “my POP account, .mac account, and the smtp.mac.com are all working correctly” mean? Which account has the problem? Those accounts are clearly not working correctly if you have this problem...
    What does “The emails don't get sent to the draft file” mean? Which messages would you expect to be moved to Drafts and as a result of doing what?
    I assume that the account is "online", i.e. Mailbox > Go Online appears disabled (grayed out), right? If that's the case, try this:
    1. In Mail, move any messages waiting in Outbox to another mailbox (e.g. Drafts), to avoid losing them.
    2. Quit Mail.
    3. In the Finder, go to ~/Library/Mail/Mailboxes/.
    4. Locate Outbox.mbox and move it to the Trash.
    5. Open Mail. A new (empty) Outbox.mbox will be created automatically. Check whether the problem is fixed.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. That is, ~/Library is the Library folder within the user’s home folder, i.e. /Users/username/Library.

  • IPad email not sending

    Hello all,
    I just composed an email on my iPad, tapped [Send], and it disappeared. Permanently, by the looks of things. The Drafts, Outbox, Sent Messages and Sent folders are all empty. There is no record of my composed outgoing message.
    Here's my only clue: When I check all the places said email should be residing, all the folders are hung up in "Connecting" status.
    Outgoing mail server settings: fine.
    Internet connection: fine.
    I can receive mail.
    I asked the guy next to me to check his work mail (coxmail) from his Mac Book Air...fine.
    Do I need help? or just a beer? what am I missing?

    Were you sending via a MobileMe SMTP Server?  You may find the following chat session with MobileMe amusing and it may explain the problem either from the IPAD Mail program or MobileMe or other "online servers" such as Google, Hotmail etc.
    I didn't have much room to write and couldn't review what I was writing.
    Customer [7:14 p.m.]:
    I composed two messages today. A new message and a reply to a message I received on my MobileMe server.
    Customer [7:14 p.m.]:
    Whatever the reason, my default SMTP for new messages was MobileMe.
    Customer [7:14 p.m.]:
    At the time I composed the messages I didn't know I was offline (I am in a hotel where I need to authenticate every 24 hours).
    Customer [7:15 p.m.]:
    I authenticated and went back online and just assumed my mail would be sent. I checked my mail and was receiving mail on all three servers.
    Customer [7:15 p.m.]:
    I realized later that the two emails I composed did not send, were not in sent items, were not in drafts, and not in "outbox"
    Customer [7:16 p.m.]:
    I then tried to recreate the problem by going offline.
    Customer [7:16 p.m.]:
    I composed a message with me.com as the server - the message did not appear anywhere after pressing send.
    Customer [7:16 p.m.]:
    not in drafts or an outbox or any other folder.
    Customer [7:16 p.m.]:
    When I went online however, the message was found in some kind of cache and sent.
    Customer [7:17 p.m.]:
    Now I'm hoping there is a way to retrieve these two messages
    Advisor [7:18 p.m.]:
    I can understand your concern with this issue. What were the subject titles of the emails you are searching for?
    Customer [7:18 p.m.]:
    I can give you an approximate time I went online.
    Customer [7:19 p.m.]:
    I believe one was called "status" and the other was "card details"
    Customer [7:20 p.m.]:
    Six hours and 40 minutes ago - roughly
    Advisor [7:20 p.m.]:
    Okay, thank you. Actually right now we are having a issue with all mail servers today. At this time, we are asking customers to use their online account at www.me.com to send and receive messages. This is a brand new issue and we are working to get this resolved as soon as possible.
    Customer [7:21 p.m.]:
    Here is my concern. The email I wrote was long and involved and to recreate it would be very difficult - do you believe this email has been permanently lost?
    Advisor [7:23 p.m.]:
    No, absolutely. If the mail was sent through MobileMe servers then it is there.
    Customer [7:23 p.m.]:
    Well that is what I'm asking - was it left in some unknown cache location on my iPad or was it transmitted?
    Customer [7:23 p.m.]:
    How would I know.
    Advisor [7:24 p.m.]:
    No, I'm talking about MobileMe servers that you would not be able to see on your iPad or in me.com. Not a Sent folder or Draft folder. We would have to retrieve the message.
    Customer [7:27 p.m.]:
    I understand that - but since I tried to recreate the problem I noticed that a message composed and sent on the ipad while offline is "saved" in an unknown location. When coming back online the mysteriously "saved" message is found by either MobileMe and Ipad and "sending" appears below the status. Of course these two emails have now been missing for almost 7 hours so I was wondering if you can confirm they are on your server.
    Advisor [7:29 p.m.]:
    We cannot see actual messages or their titles on the server. We can only see the amount of messages in each folder. They would have to searched for to pull them from the server.
    Customer [7:29 p.m.]:
    ok what is the next step - as this is time sensitive.
    Advisor [7:30 p.m.]:
    Please give me a few minutes.
    Customer [7:40 p.m.]:
    I'll be away from my computer for a few minutes as well so if you return in my absence please don't disconnect
    Advisor [7:41 p.m.]:
    Thank you for waiting. This issue requires an escalation which means a Senior Advisor will contact you within 24-48 hours through an alternate email address. Can you provide an alternate email address please?

  • Cfmail not sending to external address

    Hello,
    I have a new web server that I am testing before turning it on live. I have run into a cfmail issue. The server is
    Windows 2008 R2, 64Gig ram, 64-bit, IIS 7.5, Coldfusion 9.0.2 multi server, clustering 2 CF instances, JDK1.7.0_71
    We had a company setup CF and harden so this may be related to the hardening but I am not sure.
    <cfmail is not sending email to recipients outside of our domain/work domain. The 1st <cfmail> tag below sends the email but the 2nd one does not. This is what I see when trying to send via the 2nd <cfmail> tag with external recipient email address domain
    - no errors on the page I run in the browser
    - email is not received at [email protected] (syntax is correct)
    - attempt #2 shows up in mail/Undelivr folder
    - mail.log has this error
    "Error","scheduler-3","01/15/15","10:13:27",,"javax.mail.SendFailedException: Invalid Addresses;   nested exception is:  com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay
    - application.log - no error
    - exception.log has same error in addition to stack trace
    - server.log no error
    Any help is appreciated
    Joe
    <cfmail to="[email protected]" from="[email protected]" subject="test" type="html">
        #DateFormat(now(),"mm/dd/yyyy")# #TimeFormat(now(),"HH:mm:ss")#<br />
    </cfmail>
    <cfmail to="[email protected]" from="[email protected]" subject="test" type="html">
        #DateFormat(now(),"mm/dd/yyyy")# #TimeFormat(now(),"HH:mm:ss")#<br />
    </cfmail>

    CFMAIL is just a wrapper for the underlying Java mail API methods, so there should not be any problem with it.
    Seems like SMTP server is not registered to send mails out. So this is purly the problem with the SMTP server, not with the CFMAIL
    HTH
    Thanks
    VJ

  • Why will IMAP email not send from Mac OS 10.10.1 Yosemite Mail even though it is configured the same as on my old Macbook (and emails are sending just fine on the old computer)?

    I can receive but cannot send IMAP email on my 1&1 mail account from Mac OS 10.10.1 Yosemite Mail on my new Macbook Pro. The account is set up the same port, password, username, server name as on my old Macbook and emails are sending just fine on the old computer.
    When I hit send on the new Macbook Pro running Yosemite I get this message:
    "The connection to host ... on port 993 failed.
    Select a different outgoing mail server from the list below or click Try Later to leave the message in your Outbox until it can be sent."
    It shows the server as (offline)
    I've tried erasing and typing in the password.  I've tried both checking and unchecking Automatically detect and maintain account settings. Still cannot send.
    I also have a Gmail account and it is working...

    email service uses an Incoming Server and an Outgoing Server. Mac Mail makes access to the Incoming Server(s) obvious, and hides the settings for the outgoing Server(s). A quick and easy way to get access to the Outgoing Servewr settings is to use:
    Window > Connection Doctor ...
    ... then click on the red light for the Server that is not working for you to see its settings.
    This web page will make an educated guess about how to set up your Servers, and NO SPAM will follow:
    https://www.apple.com/support/mail-settings-lookup/

  • Mail in OS Mavericks HELP!!! Why do some of my emails not send despite the sent sound playing?

    Dear Mac Community
    I have a MacBook Pro running OS 10.9.1 and everything is fully updated.
    I use the Mac Mail programme to send and receive Gmail emails as I have done for many years.
    Recently, I started to notice a worrying problem. Every 10 or 20 emails or so, (I haven't noticed a specific regularity), I write an email and press send. The mail seems to send fine and I get the sound notifying me it has left the outbox. However, when searching for a reply, I find that in fact it is not in sent items, and it has only been located in Archive - Gmail (all mail) or Trash - Gmail, and not in any sent folder. Indeed, when I ask the recipient if it has been received they say no.
    Since the mail programme is telling me at the time of sending there isn't a problem, how can I ensure that all emails are sending correctly without checking 'sent items' every time I send one, which would be deeply frustrating. I've only noticed this a few times because key emails haven't been replied to - but it's possible that there have been several other incidences I haven't been aware of.
    I don't know if this is related, but another similar problem occasionally arises, whereby an email pops in on my phone (iPhone 5s also using mac mail programme for gmail) but not on the computer. In fact I can't see it unless I click on the 'Gmail Archive' folder where it appears, and copy it manually into my inbox. The regularity of this seems to be equal to that of the former problem, which is why I wondered if it could be related.
    All help gratefully appreciated
    Thanks
    MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9.1)

    In that case your email provider's server is having difficulties to deliver the message to the recipients email provider server.
    This has got nothing to do with Thunderbird.
    There is little you can do though. You may have the recipient to check with his email provider if they have any issues.

  • Email issues sending to single user

    or it could be the content of his email. does he have a signature block? What does it say?

    Hello!One of our users currently has an issue sending to another user outside our organization. Our user can receive emails from the outside user and many of our other users exchange email with this outside user daily.Here's more information:Our server is the generating while their server is the receiving:Remote Server atx.com (Their IP) returned '400 4.4.7 Message delayed'- Remote Server at x.com (Their IP)returned '441 4.4.1 Error encountered while communicating with primary targetIP address: "Failed to connect. Winsock error code: 10060, Win32 errorcode: 10060." Attempted failover to alternate host, but that did notsucceed. Either there are no alternate hosts, or delivery failed to allalternate hosts. The last endpoint attempted was x.x.x.x:25'Again, the delays are only happening when our user attempts to send an email to this...
    This topic first appeared in the Spiceworks Community

  • Outlook email not sending?? whats up with this?

    Iphone 5S not sending outgoing messages? can anyone help?

    Is this a work account.
    Did you double check your email settings?
    Have you deleted and re add the account?

  • Server aol imap cannot be contacted on the default ports...emails not sending

    my emails are not sending it says
    cannot send message using the server aol
    the server AOL IMAP cannot be contacted on the default ports

    Hello Sophie,
    Thank you for all the information you provided about what is going on with your email on your MacBook Pro.  I recommend following the steps in the article below to continue isolating and troubleshooting the issue you are experiencing with Mail:
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/kb/ts3276
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • POP3 email not sending on iPad2 with exact same server info as what I've got on the iPhone!

    I have a pop3 account and my own mail servers that I can't send and receive emails with no hassles what so ever. Problem is now the bloody iPad with exactly the same information will not send any emails but will receive them. Please note that I have checked sync manually on both iPad and iPhone but the problem still exists.

    I can't help directly with your problem but you might check here http://tim.id.au/laptops/apple/macpro/ for a service manual which could answer your question.

Maybe you are looking for

  • Itunes 7.5 spinner at start-up

    I'm seeing the spinner when I first start itunes 7.5 it lasts several seconds, but does eventually go away it's very annoying. Anyone have any ideas ? Needless to say this way not a problem with previous versions.

  • How to display dates in half-months?

    How can I display dates in half-months from dim_date table? like shown below: Assume that 8/14/2012 is current date.. 07/15 - 07/30 - no. of opties created between those dates 07/01 - 07/14 - no. of opties created 06/15 - 06/30 - ... 06/01- 06/14 - .

  • Navigation to ITS navbar entry

    Dear Experts, Using transaction launcher, we have configured an entry at navigation bar that allow us to consult an Sales Order in CRMD_ORDER transaction (using ITS and passing the currentOneOrder Guid). My question is: It is possible to navigate dir

  • Can anybody tell me the probme?

    In fnd_log_messages i get error as follows: per.plsql.hr_dflex_utility.ins_or_upd_descflex_attribs.30 per.plsql.hr_dflex_utility.ins_or_upd_descflex_attribs.40 per.plsql.hr_dflex_utility.ins_or_upd_descflex_attribs.40 per.plsql.--====== FLEX VALUES =

  • MBEW-LPLPR Change pointer creation

    Hello Experts, I need a clarification on Change Pointer concept. I am trying to change the planned price (mbew-lplpr) in the costing view of MM02 through a transaction CK24. CK24 sets the current price in MM02. change pointer is enabled at the data e