Are socket needed to send emails?????

hi guys,
lets say i need to send an email notification everytime i finish doing a cetain i need to create and use a socket to send these emails????
thanks in advance for any help...
lost and blur.
Below are the codes to send email:
(So are socket needed???)
public void execute(String mailto, String mailcc, String mailsub, String mailbody){
//session object inside the catch block also(in case of DCOException).
DCOSession ds = null;
ds = new DCOSession(); // Create new DCOSession object
ds.login("erstest02"); // Log in as current Notes client user
DCOMail dm = new DCOMail(); // Create new DCOMail object
dm.setDcoSession(ds);// Pass DCOSession to mail
//System.out.println("before mail sent");
dm.send(); // Send the mail
ds.logout(); // Log out of the session
System.out.println("mail sent to "+mailto);
}catch(DCOException e1){
ds.logout(); //Log out of session even if exception is thrown
}catch(Exception ee1){
System.out.println("Exception thrown while trying to logout of session");
}catch(Exception e){
ds.logout(); //Log out of session even if exception is thrown
}catch(Exception ee2){
System.out.println("Exception thrown while trying to logout of session");

lets say i need to send an email notification
everytime i finish doing a cetain i need
to create and use a socket to send these emails????Yes, sockets are needed to send emails. However, you don't need to deal with them yourself. You can use the JavaMail API. It will hide those low level details from you and let you deal with concepts that are related to sending emails--addresses, contents, servers, etc.

Similar Messages

  • Need to send email with content of total sales

    Hi experts,
    I have configure notification mailer and have received also test email. Usually I may receive oracle alerts in my email address.
    I need two solutions or need to build below mention point.
    1) need to send email total daily sale ?
    2) need to setup oracle alerts ?
    I am waiting your kind response or refer solid documents to fulfil my requirements

    You can configure an alert that fires every day at about 1:00 am.
    The alert can query oe_order_lines_all table for all orders lines that were created in booked status on the prior day.
    Then you can format the alert to include the total amount.
    You can group by sales person or by warehouse.
    If you want to group the sales by item numbers, the email may become long depending on the number of items you sell every day.
    See for a great example on how to send a summary alert.
    Hope this helps,
    Sandeep Gandhi

  • Need to send email to email addresses in one list when list 2 is updated

    I have  2 lists
    list 1 has email addresses
    the 2nd list is actually a document library
    what I was wondering, is how can I send an email to people to people in list 1 when list #2 is updated with new documents?
    i have been trying different  ways of doing it, but no luck....
    anyone have any ideas how to capture the email address from list 1 and send them an email when list #2 is updated?
    seems straight forward but cant find the logic...

    I would suggest you to go for custom event receiver using visual studio. Its an easy way.... try it out.
    Choose List item event in event receiver settings.
    Step 1:Add item was added and item was updated event. Use caml query to fetch email address and loop through the collection and send email using SPUtility. Refer below code.
    /// <summary>
    /// An item was added.
    /// </summary>
    public override void ItemAdded(SPItemEventProperties properties)
    using (SPWeb web = properties.OpenWeb())
    SPQuery query = new SPQuery();
    query.Query = "<OrderBy><FieldRef Name='Title' Ascending='False' /></OrderBy>";
    SPList emailList = web.Lists["List1"];//The list which has the email addresses
    SPListItemCollection listItemCollection = emailList.GetItems(query);
    foreach (SPListItem item in listItemCollection)
    SPUtility.SendEmail(web, true, false, item["emailAddress"].ToString(), "Your Mail subject", "Your mail body");
    /// <summary>
    /// An item was updated.
    /// </summary>
    public override void ItemUpdated(SPItemEventProperties properties)
    //you can provide same code here..if needed.
    Step 2: Provide the list2(document library) path as the ListUrl in Element.xml
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="">
    <Receivers ListUrl="/list2/"> <!--provide document library path...-->
    Deploy it to your SharePoint farm..make sure the feature is activated..and enjoy..
    Probably this should work..Check it out and let me know..

  • Help needed for sending email

    I need to send one mail to sales order representative. I have mail Id.
    I am using FM "SO_NEW_DOCUMENT_SEND_API1".
    In email in subject line I need to write 'Sales order' & in body I need to write "Sales order created'.
    Anybody will suggest me in which parameters I need to pass the above mentioned value so that I can get appropriate mail??

    HI NEHA,
    Here is the sample one.
    *Internal table to get vendor name and address number
      DATA : BEGIN OF it_vname OCCURS 0,
             name1 LIKE lfa1-name1,
             adrnr LIKE lfa1-adrnr,
             END OF it_vname.
    *Internal table to get email_if with address number
      DATA : BEGIN OF it_vemail OCCURS 0,
             email LIKE adr6-smtp_addr,
             END OF it_vemail.
    *Emiail subject
      DATA : psubject(40) TYPE c .
    *Data declaration for mail FM
      DATA:   it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
              it_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
              it_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              gd_cnt TYPE i,
              gd_sent_all(1) TYPE c,
              gd_doc_data LIKE sodocchgi1,
              gd_error TYPE sy-subrc.
    *Internal table for message body
      DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                      WITH HEADER LINE,
              it_messagewa LIKE LINE OF it_message        .
      <b>psubject = 'PO Regarding'.</b> 
    *Accessing name and address number of a vendor
      SELECT SINGLE name1 adrnr FROM lfa1 INTO it_vname WHERE lifnr EQ i_ekko-lifnr.
    *Accessing mail id of a vendor
      SELECT SINGLE smtp_addr FROM adr6 INTO it_vemail WHERE addrnumber EQ it_vname-adrnr.
    * Mail Text
        CLEAR it_message.
        REFRESH it_message.
      <b>CONCATENATE 'Dear' it_vname-name1 ',' INTO it_messagewa SEPARATED BY space.
      APPEND  it_messagewa TO it_message.
      APPEND 'Please issue the items for the following PO Number .' TO it_message.
      CLEAR it_messagewa.
      CONCATENATE 'PO NUmber : ' i_ekko-ebeln  INTO it_messagewa</b> SEPARATED BY space.
      APPEND it_messagewa TO it_message.
      APPEND 'you can view it at www' TO it_message.  APPEND 'Regards,' TO it_message.
      APPEND 'TEST.' TO it_message.
    * Fill the document data.
      gd_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    * Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    * Add the recipients email address
      CLEAR it_receivers.
      REFRESH it_receivers.
      it_receivers-receiver = it_vemail-email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      APPEND it_receivers.
    * Call the FM to post the message to SAPMAIL
          document_data                    = gd_doc_data
          put_in_outbox                    = 'X'
          commit_work                      = 'X'
         sent_to_all                      = gd_sent_all
    *   NEW_OBJECT_ID                    =
          packing_list                     = it_packing_list
    *   OBJECT_HEADER                    =
    *   CONTENTS_BIN                     =
          contents_txt                     = it_message
    *   CONTENTS_HEX                     =
    *   OBJECT_PARA                      =
    *   OBJECT_PARB                      =
          receivers                        = it_receivers
         too_many_receivers               = 1
         document_not_sent                = 2
         document_type_not_exist          = 3
         operation_no_authorization       = 4
         parameter_error                  = 5
         x_error                          = 6
         enqueue_error                    = 7
         OTHERS                           = 8
      IF sy-subrc <> 0.
    * Store function module return code
      gd_error = sy-subrc.
    * Get it_receivers return code
      LOOP AT it_receivers.

  • I need to send email in future specific day how can i do this ?

    If someone can helps thanks alot.

    You go for following approach :-
    1. Maintain a table with contains all date when you need to send mail. it can be one date or many.
    2. create a custom program which will first read this table above and see if todays date does exist in table.. if yes it will send mail else not.
    3. Now schedule report on daily basis. 
    Thats it. When ever you want to send mails just enter those dates in this table. it can be any no of future dates.
    Hope this helps.
    Enjoy SAP.
    Pankaj Singh.

  • I need help sending emails.  unable to take gmail account on line

    I am having problems sending emails from my mac.  Gmail is offline how do I get bak on line?

    Have you tried:
    If you can’t send or receive email on your Mac - Apple Support

  • Hi need to send email with msg pls suggest a code to do so

    i want to send email to users with a simple message like for eg shipment shipped
    please suggest some code for it how to do it

    Here is a simple macro to do this.  Obviously this is not generic enough, but it is very easy to tweak this to do whatever you want.
    define send_mail.
      data : header_text(40).
      object_hd_change-objla  = sy-langu.
      read textpool sy-repid into text_tab language sy-langu.
      read table text_tab with key id = 'R'.
      move text_tab-entry to object_hd_change-objnam.
      concatenate text_tab-entry ' Error ' into
      object_hd_change-objdes separated by space.
      object_hd_change-objsns = 'C'.      "SENSITIVITY
      objcont-line = 'The following messages were received:'.
      append objcont.
      clear objcont.
      objcont-line = ' '.
      append objcont.
      clear objcont.
      objcont-line = &1.
      append objcont.
      receivers-recesc = 'B'.            "SAPmail to SAP user
      receivers-recextnam = sy-uname.
      receivers-recnam = sy-uname.
      receivers-sndex  = 'X'.
      receivers-rcdat     = sy-datum.
      receivers-rctim     = sy-uzeit.
      append receivers.
      call function 'SO_OBJECT_SEND'
                object_hd_change           = object_hd_change
                object_type                = object_type
                objcont                    = objcont
                objhead                    = objhead
                objpara                    = objpara
                objparb                    = objparb
                receivers                  = receivers
                active_user_not_exist      = 1
                communication_failure      = 2
                component_not_available    = 3
                folder_not_exist           = 4
                folder_no_authorization    = 5
                forwarder_not_exist        = 6
                note_not_exist             = 7
                object_not_exist           = 8
                object_not_sent            = 9
                object_no_authorization    = 10
                object_type_not_exist      = 11
                operation_no_authorization = 12
                owner_not_exist            = 13
                parameter_error            = 14
                substitute_not_active      = 15
                substitute_not_defined     = 16
                system_failure             = 17
                too_much_receivers         = 18
                user_not_exist             = 19
                x_error                    = 20
                others                     = 21.
      if sy-subrc <> 0.
        write :/ 'Error Sending the Object', sy-subrc.
        Commit work.

  • HELP!!! My settings are wrong need to send for printing

    I am doing brochure's for my company. I am from South Africa.
    I use Illustrator for the brochure, Layout and Text.
    Last month the printer had problems with printing the brochure. I discovered my settings are wrong.
    This was the settings:
    Colour Setting
    Settings:     Custom
    RGB:               sRGB IEC61966-2. 1
    CMYK:            U.S. Web Coated (SWOP) v2
    Color Management Policies:
    RGB:               Off
    CMYK:             Preserve Numbers (Ignore Linked Profiles)
    Profile Mismatches:  Ask When Opening (ticked)
                                   Ask When Pasting ( Not Ticked)
    Missing profiles:       Ask When Opening (Ticked)
    Then I did research On Adobe Community Help and changed it to the below but its wrong too
    Colour Setting
    Settings:     Europe Prepress 3
    RGB:               Adobe RGB (1998)
    CMYK:            Coated FOGRA39 (ISO 12647-2:2004)
    Color Management Policies:
    RGB:               Preserve Embedded Profiles
    CMYK:             Preserve Numbers (Ignore Linked Profiles)
    Profile Mismatches:  Ask When Opening (ticked)
                                   Ask When Pasting (Ticked)
    Missing profiles:       Ask When Opening (Ticked)
    Can someone help me to set it right according to RSA printers settings, something like a default setting.
    Last Month the printer said the below:
    - fonts are not embedded.
    - black is not on overprint and is 4 colour black
    I never had this problem before, so I have no idea what went wrong all of a sudden.
    Now when I open my prevoius work on Illustrator or Photoshop, a small window pops up saying work is not according to this settings, etc.
    Please help. Im desperate.
    I need to start my new brochure tomorrow
    Thank you in advance

    You should get a preflight checklist from your print vendor.  Here's what I have set in Illustrator...
    You should also send the print vendor a press-ready PDF.  Not all of the file problems are limted to color settings.  For instance...
    "Last Month the printer said the below:
    - fonts are not embedded. "
    When you Save As > EPS, select "Include Fonts" in the selection process; and when Save As > Press Quality PDF, select "Embed Fonts" in the Settings dialogs.
    "- black is not on overprint and is 4 colour black"
    In Preferences > Appearance of Black, select "Accurate Black" in both screen and print; in your file, set appropriate Black elements to Overprint in the Color "Attributes" dialog.
    Whenever you are not sure what the printer is talking about, ask them to explain what they mean and help you fix the problems.  If they refuse, ask them where you can get help.  Most good shops will be willing to help you.

  • Server socket needs to sends images to applet

    Dear expert programmers
    I've got a simple socket server ruuning on my machine which accepts a connection from an applet on an arbitrary port.
    The problem I have is that it needs to "CONSTANTLY" take screenshots of the desktop and send them to the applet so that the applet can load them for people to see. It's a remote desktop project I've been working on for some time now and I have no idea on how to create images and send them using sockets to an applet.
    Could someone please help me - sample code would be appreciated - also efficiency of sending desktop scrrenshots isn't an issue for now.
    Many thanks

    ok, need to know what you have/can get working....
    have you got any working commuincation between Applet and server?
    could you write a method that converts int to 4 bytes?
    and use that to convert int[] to byte[] (4 times as big)?
    for the screen capture part..
    Robot robber=new Robot();
    BufferedImage bi=robber.createScreenCapture(new Rectangle(0,0,screenWidth,screenHeight));
    int[] pixels=bi.getRGB(0,0,screenWidth,screenHeight,null,0,screenWidth);
    byte[] data=toByteArray(pixels);get the outputStream from the connected Socket and use its write(byte[] b) method to send the data
    at the Applet, get the InputStream, use its read(byte[] b) method to get the data
    re-pack to int[] and use setRGB(0,0,screenWidth,screenHeight,int[] data,0,screenWidth)
    get the Graphics Object for the display element of the Applet you want to show the image and use drawImage(BufferedImage,0,0,null) to display

  • I desperately need to send emails from Sage Accounts linked with Firefox and not Outlook Express. Tried everything

    I am using Sage Instant Accounts and need to email customers their invoices directly. I have recently changed computer and upgraded Sage and I can no longer do this although could do it last week. I used to be able to go into email in Sage and Firefox would automatically come up with my contacts etc.
    I think Sage looks to Outlook Express. If I delete Outlook Exp will that be an answer?
    Have phoned Sage but they have no further answers. So need help as spent too much time!

    I use Outlook so this might not be quite the same with Outlook Express.
    After I set up an email account I can 'Test' the account settings which effectively sends a test email from the account to itself. If that is possible then check which way works i.e. the sending or the receiving of the email. If it is just the incoming part then this could be that you need to tick the box in the account settings that says 'My outgoing server requires authentication'.
    Other than that check your incoming and outgoing servers which, if you're using btinternet should be both set as, I also suggest you check your username and password.
    Good luck!

  • Password Needed For Sending Emails - EVERYTIME

    All of a sudden, every time I try to send an email from Apple Mail, using my iCloud account, I get a pop-up asking me to enter my system administrator password. Someone please help me figure this out before I throw this computer out the window. I am beyond frustrated right now.
    <Edited by Host>

    Back up all data before proceeding.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Select the login keychain from the list on the left side of the Keychain Access window. If your default keychain has a different name, select that.
    If the lock icon in the top left corner of the window shows that the keychain is locked, click to unlock it. You'll be prompted for the keychain password, which is the same as your login password, unless you've changed it.
    Right-click or control-click the login entry in the list. From the menu that pops up, select
              Change Settings for Keychain "login"
    In the sheet that opens, uncheck both boxes, if not already unchecked.
    From the menu bar, select
              Keychain Access ▹ Preferences... ▹ First Aid
    There are four checkboxes in the window that opens. Check all of them. if they're not already checked. Close the window.
              Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.
    If you use iCloud Keychain, open the iCloud preference pane and uncheck the Keychain box. You'll be prompted to delete the local iCloud keychain. Confirm. Then re-check the box. Follow one of the procedures described in this support article to set up iCloud Keychain on an additional device.

  • Unable to send or receive emails! When I first bought my Macbook I never paid for the mac mail. I have tried to find Mobile Me to no avail. What software program do I need to send emails??

    Hi all! I bought my macbook pro around two years ago. I currently have the Snow Leopard operating system. I have just clicked on Lion to upgrade however I am aware that the Mac Mail required you to pay for it? I click on the mail link and it does not work i.e. the send button is greyed out. Please advise?

    You don't need to pay anything extra for Apple Mail. You may need to pay extra money to Yahoo and/or Hotmail if you want to connect to them with a true e-mail client like Apple Mail. I would provide links for more information, but it appears to be not quite supported. I think it is a service for mobile applications that people on computers can connect to if they hack around a bit. Your ability to connect with Apple Mail depends on how much you want to hack around.
    The easiest solution would be to wait a few weeks until Apple rolls out iCloud. Then you will be able to sign up for that instead of the defunct MobileMe.

  • HT3228 Need help sending email from iPhone 5S

    Have a new iPhone 5S and can receive email but every email I try to send is copied to the outbox and message says the recipient was rejected by the server. How do I fix that?

    You can't use iCloud to do that.  Any photos in iCloud must also be on your phone.  If you delete them from your phone, they will also be deleted from iCloud and they will be lost.  You might want to try updating your phone using iTunes on your computer (as explained at the bottom of this article: Update your iPhone, iPad, or iPod touch iOS software).  It requires much less space than updating over the air. 

  • Need to send email on failure of BeX broadcasting

    Hi experts,
    We have a requirement where users should receive a email when the broadcaster setting triggered in background[process chain] failed due to some reason [for ex: memory shortage].
    User is willing to have details for the failure and for which broadcasting setting it failed for.
    Also advice me if we can broadcast a data to any particular applicaiton server / sharenet / share drive.
    suresh Kumar


  • Need to send email with excel sheet as attachment: URGENT

    Hi all....i have a requirement where i should extract data from SAP. These datas has to be sent to a mail id entered in the selection screen in excel sheet as an attachment.Can you suggest me any function module that meets the requirement...
    For kind information...there is only one selection field for entering the mail id.
    Thanks in advance

    Hi all....i have a requirement where i should extract data from SAP. These datas has to be sent to a mail id entered in the selection screen in excel sheet as an attachment.Can you suggest me any function module that meets the requirement...
    For kind information...there is only one selection field for entering the mail id.
    Thanks in advance

Maybe you are looking for

  • Nokia n91 not working as it should

    please can anyone tell why when l get songs sent to me by bluetooth. I can only get one song on n91 it keeps on saying the memory is full. Also any songs l download off the windows media player onto my phone, say the tracks are corrupted and they won

  • Pavilion f1703 monitor goes blank 2 seconds after start-up

    When the computer is turned on, the monitor only functions for a couple of seconds before it goes blank..power light shows it to be working. If I turn the monitor off at the front power switch, and turn it back on, the same thing happens..2 seconds o

  • Project wise Profit & Loss account.

    Dear All, Our sales are routed through WBS Element and cost is booked against Cost Center.  Our Management wants to see project wise Profit & Loss account.  Any suggestions on deriving this?? Regards, Mike.

  • How to make graphics move fluidly around screen?

    hi, I'm making a simple space invaders game using JPanel and have so far made the ship and aliens move around the screen (the aliens move automatically, the ship requires key presses). The ship and aliens are currently simple java 2D shapes and I've

  • How to merge music from a My Music (Windows media audio files)  and iTunes?

    Purchased some music from iTunes music store and I am hoping to get them on my MP3 player that is NOT an iPod. Is there a way to do this? I want to have these songs as well as songs from my My Music folder (Windows media audio files) on my MP3 player