Email from a UDF

Hi,
is it possible through SDK to send an email from SAP B1 that the email address will come from a UDF (instead of contact email?)
Thanks,
Vangelis

Hi
I think it is possible , try this code
Private Sub SendEmail(ByVal _subject As String, ByVal _message As String)
            Dim objMsg As SAPbobsCOM.Messages
            Dim lngStatus As Integer
            Dim lErrCode As Integer
            Dim sErrMsg As String
            Try
                objMsg = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMessages)
                objMsg.Subject = _subject
                objMsg.MessageText = _message
                objMsg.Recipients.Add()
                objMsg.Recipients.SetCurrentLine(0)
                objMsg.Recipients.UserCode = "emily"
                objMsg.Recipients.SendInternal = SAPbobsCOM.BoYesNoEnum.tNO
                objMsg.Recipients.SendEmail = SAPbobsCOM.BoYesNoEnum.tYES
                objMsg.Recipients.EmailAddress = "mail address"
                objMsg.Priority = SAPbobsCOM.BoMsgPriorities.pr_High
                lngStatus = objMsg.Add
                If lngStatus <> 0 Then
                    B1Connections.diCompany.GetLastError(lErrCode, sErrMsg)
                    B1Connections.theAppl.SetStatusBarMessage(lErrCode + " " + sErrMsg)
                    'Return False
                Else
                    B1Connections.theAppl.SetStatusBarMessage("Message Send Sucessfully")
                    '  Return True
                End If
            Catch ex As Exception
                B1Connections.theAppl.MessageBox(ex.Message)
            End Try
        End Sub
Regards
Arun

Similar Messages

  • Subject & Message content in emails from XI

    All,
    We need to send an email from the XI system. The message that we use is the following,
    <target>
    <name> John Doe</name><designation>manager</designation>
    <name> Mary Jane</name><designation>supervisor</designation>
    <name> Foo Bar</name><designation>customer associate</designation>
    </target>
    we need to send the email with the message body as follows,
    John Doe, manager
    Mary Jane, supervisor
    Foo Bar, customer associate
    How do we strip the xml nodes from the message? Also currently this email has a subject of "Employee New Hire Report". How can we add the current date also to this subject ("Employee New Hire Report 07/21/2007") ?
    Thanks.

    If you requirement was only the mail with flat fields (no xml), then you could simply use Content Conversion Module (http://help.sap.com/saphelp_nw70/helpdata/en/44/748d595dab6fb5e10000000a155369/frameset.htm) before your receiver mail adapter module.
    But since you have the requirement for the date in the subject, you could try to use Mail Package (check this blog for a reference: /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address).
    With simple logics within your message mapping, you could have your subject with date and the content field as required (for line feeds in UDF, use "\n" character in the concatenated string).
    Regards,
    Henrique.

  • Cannot send email from yahoo account on iPhone 5

    I just got an iPhone5 and I couldn't set up my Yahoo email as "yahoo"--it would not allow me to complete the process despot multiple attempts. I had to set it up as an "other" account. I can receive and read emails on my phone, but when I reply those messages will not send. They go to the outbox and an error message pops up that says" the email account has been rejected by the server" Does anyone have advice on either issue: setting up yahoo properly and/or sending email from phone?

    outgoing mail server
    SMTP - Yahoo! SMTP Server
    primary server
    Yahoo! SMTP server - ON
    server port 465
    That's what I have for my yahoo account.

  • Cannot send email from non .mac server

    I am only able to send/reply emails using my .mac address. My 2 other server addresses keep giving me the following message.
    "Cannot send mail. One of the recipient addresses was invalid".
    How can I fix this?

    You should be able to send email from Safari, however I do wonder why you wish to do this and whether there is something inherently wrong with using your mail app and your iCloud address.

  • Cannot send email from MobileMe account

    Apple recently pushed out an update to the MobileMe calendar. Since upgrading my account, I am unable to send emails from Firefox4 (current version) in Windows. The page sits indefinitely at a loading screen. Apple Support won't help because it isn't an issue with Safari. Anyone else have this issue?

    When using the MobileMe account preset to create the account, the SMTP server is created with 587 as the SMTP server port, which can't be changed when using the MM account preset to create the account.

  • Cannot send email from messages app

    Hey everyone
    I am unable to send an email from my iPhone to any email address. This feature was working perfectly a couple weeks ago. Once I noticed the issue, I restored my phone and upgraded it to iOS 6.1. This still did not fix the error unfortunately.
    Any advice?

    resolved part one: played around with mail preferences of user two to match prefs in user one
    still do not know about access to TDM saved addressbook data.

  • Cannot send email from Powershell on Mailbox Role

    Hi,
    I am trying to send an email from Powershell on Mailbox role of Exchange server. I have installed Symantec Mail Security on Mailbox Role.
    When I try to send email using Powershell, I got the following error.
    PS C:\a> Send-MailMessage -to [email protected] -Subject "Alert Closed.. Service is restarted on Computer" -from
    [email protected] -Body "The service was found stopped on Computer it was started automatically and it is now running normally." -bodyasHTML -priority High -SmtpServer smtp.domain.com
    Send-MailMessage : Service not available, closing transmission channel. The server response was: 4.3.2 Service not active
    At line:1 char:1
    + Send-MailMessage -to [email protected] -Subject "Alert Closed.. Service is ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
        + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
    This command is working fine on every server except exchange server (CAS, Mailbox). Firewall is off on the servers.
    Any help will be highly appreciated.
    Regards,
    Anees

    Hi,
    Please check the similar thread .
    http://social.technet.microsoft.com/Forums/exchange/en-US/ef699832-8da9-4709-9a50-c6223b13bd95/sendmailmessage-returns-the-server-response-was-432-service-not-available?forum=exchangesvrsecuremessaginglegacy
    smtp server (smtp.domain.com) is rejecting the connection from the
     Mailbox role of Exchange server.
    So please allow the mailbox server ip address on the smtp server's (i.e. smtp.domain.com)
    receive connector to get it done 
    Regards
    S.Nithyanandham
    Thanks S.Nithyanandham

  • Cannot send email from my college email account

    For some reason, I'm not able to send an email to my professors. I know it's not my account, in general. I'm pretty sure it has to do with the Mac format because I have sent an email from my account on a PC. Does anyone know how I can change my email settings or email format to be able to send an email from my MacBook Pro?

    First you have to find out on what PORT the SMTP your "College" is allowing through there firewalls. Then in Mail go to the Mail menu item name "Mail" and in it's drop-down select Preferences. Then click on the account for your "College" email servers. Then in the right-hand pane use the SMTP drop-down to edit the SMTP server settings to the SMTP server port your "college" is allowing through.maybe port 587.

  • Cannot send email from an iPhone to a Outlook group.

    Hi,
    My question is simple and I'd like an exactly same answer : Can iPhone users send emails from their iPhone's to one or more groups created in Outlook?
    This is my situation: our organization is using iPhone to provide email, calendar, contact, task etc. to some of their employees. We are using Airwatch MDM Agent on user's iPhone because we have an Airwatch server in place. I have an user and she has an iPhone 5 and she has created some groups in Outlook but these groups are not reflected in her Contacts in the iPhone. I have update her phone with the latest update, although I was almost sure that this was not the issue, then I've found some interesting posts on internet saying that this was a known problem for the users with the previous iOS but I thought this might has been corrected with the iOS, apparently not.
    Also I've tried ''the trick'' that is posted on several forums with the iCloud but neither so it's working. I am looking for a straight answer, if this works or not on iPhone's?
    Thanks,
    Sebastian.

    There indeed ARE apps in the app store that will do what you want.  Just search and find the one that best fits your needs.

  • Cannot send email from the Mail App?

    I've had an izymail subscription for 1 year and just renewed it last week. I could never send an email from my Mail App without a window popping up stating "izymail cannot connect to the server" and the sending bar (along the bottom of the screen) just freezes and will not send.
    I've a Hotmail account linked up to izymail. Anyone know how to fix this problem?

    I fixed my problem - I deleted my email account on my iPhone, then tried to setup a new account. I had a few problems setting it up. It wouldn't recognize the incoming or outgoing servers and I lost my email altogether for a few hours. Then I changed every setting possible and finally figured out that I had 2-3 "Other SMTP Servers" as well as my "Primary Server". Once I deleted the Other SMTP Servers, my email worked and i'm able to send emails now!
    I also think changing the "Server Port" number helped solve my problem also, and making sure "Use SSL" was turned off.

  • Cannot send email from mac account on iphone

    i'm getting error CANNOT SEND MAIL ...the connection to the outgoing sever "smtp.mac.com:myaccount" failed. I'm able to sent email from other email account ie. yahoo, gmail
    thx for your help
    Message was edited by: gman1023

    You can try deleting the account on your iphone and setting it up again.

  • Cannot send email from iPhone using Outlook account

    I cannot send or reply to emails using my att.net email account. I always get the message, "The sender address was invalid". I can receive emails from this account.

    I am having the same problem. Any suggestions would be appreciated!

  • Cannot send email from iPhone5--calendar syncing issues also

    I have an iPhone 5 and am not currently using iCloud.  I have 3 email accounts. 
    The first is a yahoo email account--and it both receives & sends emails just fine. 
    I use Outlook for the other two email accounts (one is an IMAP and the other is a POP).  Both receive email, but I cannot send out emails from my iPhone.  When I try to send an email from either account, I get this message: 
    "A copy has been placed in your Outbox.  The sender address "[address I used]" was rejected by the server.
    Also, I don't know if it is related, but my iPhone calendar isn't syncing with Outlook.  I add an appointment on my iPhone or in Outlook, and it won't appear in the other location (Outlook/iPhone). 
    Thanks for your help. 

    Check your settings, maybe the mail index is at fault.
    Setup Wizard and troubleshooting tips:
    http://www.apple.com/support/mail
    Also has a link to Mail community section.

  • Cannot send email from scanned pages

    I am having trouble with the updated HP remote app on Ipad, since the update I can scan the pages in, but then cannot send them via email. This is qute important because i work remotley from the office and rely on getting my design drawings in on a nightly basis
    please help

    cannot send email from scanned pages

  • Cannot send email from ipad?

    I can receive, but cannot send emails from my iPad. Always get message that I have wrong user name or password.

    Then make sure that the settings are correct in your email account.
    Check the outgoing mail server setting. Make sure that your username and password are in there.
    Settings>Mail, Contacts, Calendars>Your email account>Account>Outgoing mail server - tap the server name next to SMTP and check in the primary server and make sure your username and password are entered and correct - even if it says that the password is optional.

Maybe you are looking for