How to attach & send mail (Excel)

i want to attach below data in excel and send mail.
IT_DATA-COL1 = 'Action'.
     APPEND IT_DATA.
     CLEAR IT_DATA.
     IT_DATA-COL1 =  V_DATE.
     APPEND IT_DATA.
     CLEAR IT_DATA.
     IT_DATA-COL1 =  'Execution '.
     IT_DATA-COL2 =   sy-datum.
     APPEND IT_DATA.
     IT_DATA-COL1 = 'No. of pieces = '.
     IT_DATA-COL2 = L_NUM.
     APPEND IT_DATA.
     CLEAR IT_DATA.
     APPEND IT_DATA.
     CLEAR IT_DATA.
     APPEND IT_DATA.
     APPEND IT_DATA.
     IT_DATA-COL1 = 'Number'.
     IT_DATA-COL2 = 'VIp'.
     IT_DATA-COL3 = 'Key '.
     IT_DATA-COL4 = 'Brakery'.
     IT_DATA-COL5 = 'No'.
     IT_DATA-COL6 = 'State'.
     IT_DATA-COL7 = 'Date'.
     IT_DATA-COL8 = ' Date'.
     APPEND IT_DATA.
     CLEAR IT_DATA.
     APPEND IT_DATA.
       LOOP AT IT.
         IT_DATA-COL1 = IT-PROP.
         IT_DATA-COL2 = IT-VIp.
         IT_DATA-COL3 = KEY.
         IT_DATA-COL4 = IT-PLATE..
         IT_DATA-COL5 = V_REQUESTOR.
         IT_DATA-COL6 = V_STATUS .
        IT_DATA-COL7= Date .
       IT_DATA-COL8= DATE.
           APPEND IT_DATA.
         CLEAR IT_DATA.
       ENDLOOP.
       APPEND IT_DATA.
       APPEND IT_DATA.
     ENDIF.

Hi,
By the following method you can send email even if the no. of charactes in a line exceeds 255.
Here I am converting the data to HTML and later sending it in Xcel. This worked for me.
form email_lgcytrans .
  data:    lv_document_data like sodocchgi1,
           lv_tab_lines     like sy-tabix,
           li_body          type standard table of solisti1,
           lv_body          type solisti1,
           lv_html          like line of i_html,
           li_attach        type standard table of solisti1,
           lv_attach        type solisti1.
CONSTANTS:
  constants: lc_filetype(3)  type  c value 'XLS',
             lc_emaildocname like sodocchgi1-obj_name
                             value 'Legacy Trans',
             lc_subject      like sodocchgi1-obj_descr value
              'Discrepant Transactions',
             lc_filename     like solisti1
                             value 'HG-DTL DISCREPANT TRANS'.
  if i_row_head[] is initial.
    perform get_column_headers.
Get the HTML Formatted Data
  call function 'WWW_ITAB_TO_HTML'
    exporting
      table_header = v_html_head
    tables
      html         = i_html
      fields       = i_fields
      row_header   = i_row_head
      itable       = i_dscpren.
form get_column_headers.
  data : lv_fieldcat  type slis_fieldcat_alv,
         lv_text      type w3head-text,
         lv_tabix     type i.
  loop at i_fieldcat into lv_fieldcat.
    lv_tabix = lv_tabix + 1.
  Get Fieldname
    clear lv_text.
    lv_text = lv_fieldcat-seltext_l.
  Prepare Header Row
    call function 'WWW_ITAB_TO_HTML_HEADERS'
      exporting
        field_nr = lv_tabix
        text     = lv_text
        fgcolor  = 'black'
        bgcolor  = 'cccccc'
        font     = 'Tahoma'
      tables
        header   = i_row_head.
  endloop.
endform.                    " GET_COLUMN_HEADERS
form send_email tables li_attach
                       ls_ifmail
                       li_body
                using  lc_filetype lc_subject lc_filename.
Local Data for E-mailing
  data : lv_document type sodocchgi1,
         li_pack     type standard table of sopcklsti1,
         lv_pack     type sopcklsti1,
         li_receiver type standard table of somlreci1,
         lv_receiver type somlreci1,
        li_body     type standard table of solisti1,
        lv_body     type solisti1,
         li_objhead  type standard table of solisti1,
         lv_objhead  type solisti1,
         lv_admin    like line of s_ifmail .
  data : lv_lines     type i,
         lv_sent      type sonv-flag.
Fill Document Data
  lv_document-obj_langu         = sy-langu.
  lv_document-obj_expdat        = sy-datum.
  lv_document-sensitivty        = 'F'.
  lv_document-no_change         = 'X'.
  lv_document-expiry_dat        = sy-datum.
  move lc_subject to lv_document-obj_descr.
  describe table li_body lines lv_lines.
  lv_document-doc_size          = lv_lines * 255.
*-- Packing Data (for e-mail body)
  lv_pack-transf_bin            = space.
  lv_pack-head_start            = 1.
  lv_pack-head_num              = 0.
  lv_pack-body_start            = 1.
  lv_pack-body_num              = lv_lines.
  lv_pack-doc_type              = 'RAW'.
  append lv_pack to li_pack.
  describe table li_attach lines lv_lines.
*-- Packing list for email attachment (in XLS format)
  clear lv_pack.
  lv_pack-transf_bin            = 'X'.
  lv_pack-head_start            = 1.
  lv_pack-head_num              = 1.
  lv_pack-body_start            = 1.
  lv_pack-body_num              = lv_lines.
  lv_pack-doc_type              = lc_filetype.
  lv_pack-obj_name              = 'MAIL'.
  lv_pack-doc_size              = lv_lines * 255.
  move lc_filename to lv_pack-obj_descr.
  append lv_pack to li_pack.
*-- Attachment Header
  move space to lv_objhead-line.
  append lv_objhead to li_objhead.
*-- Receiver list
  lv_receiver-rec_type           = 'U'.
  lv_receiver-com_type           = 'INT'.
  lv_receiver-notif_del          = 'X'.
  lv_receiver-notif_ndel         = 'X'.
  loop at ls_ifmail  into lv_admin.
    lv_receiver-receiver         = lv_admin-low.
    append lv_receiver to li_receiver.
    clear : lv_receiver-receiver,
            lv_admin.
  endloop.
*--  E-Mail Document
  call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
      document_data              = lv_document
      commit_work                = 'X'
    importing
      sent_to_all                = lv_sent
    tables
      packing_list               = li_pack
      object_header              = li_objhead
      contents_bin               = li_attach
      contents_txt               = li_body
      receivers                  = li_receiver
    exceptions
      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.
    message id sy-msgid type 'I' number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
  if lv_sent = 'X'.
    write : / text-t12.
    loop at s_ifmail into lv_admin.
      write : lv_admin-low.
    endloop.
    clear lv_sent.
  endif.
endform.                    " SEND_EMAIL
Attach the HTML content
  loop at i_html into lv_html.
    lv_attach = lv_html.
    append lv_attach to li_attach.
    clear : lv_html, lv_attach.
  endloop.  "loop at i_html
Appending the text of boby
  lv_body-line+0(44)  = 'Please find attached Report of Discrepancies'.
  lv_body-line+45(30) = 'in Transactions'.
  append lv_body to li_body.
Send the content i_email_input to s_dsmail
    perform send_email tables li_attach s_dsmail li_body
                       using  lc_filetype lc_subject lc_filename.
endform.                    " EMAIL_LGCYTRANS

Similar Messages

  • How can i send mails from mac mail to a PC?

    When i send mails from my mac to a Pc (outlook) the mail arrive with a different format or including the mail as an atached document.
    How can i send mails from mac mail to a PC outlook with the same format?

    send it in "windows friendly format" when you click the paper clip for an attachment.

  • How can i send mails from SAP?

    how can i send mails from SAP?
    what are the configurations i have to do in SAP for that?
    pls give me a detail reply......
    if possible, pls give me the sample ABAP program for that.

    recently i have worked on a similar requirement here is the sample code for that
    REPORT ZDOC_AS_EMAIL_3.
    *& Report ZEMAIL_ATTACH *
    *& Example of sending external email via SAPCONNECT *
    TABLES: ekko.
    PARAMETERS: p_email TYPE somlreci1-receiver.
    TYPES: BEGIN OF t_ekpo,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
    wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
    ebeln(10) TYPE c,
    ebelp(5) TYPE c,
    aedat(8) TYPE c,
    matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: l_t_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    w_cnt TYPE i,
    w_sent_all(1) TYPE c,
    w_doc_data LIKE sodocchgi1,
    gd_error TYPE sy-subrc,
    gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
    *Retrieve sample data from table ekpo
    PERFORM data_retrieval.
    *Populate table with detaisl to be entered into .xls file
    PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *Populate message body text
    perform populate_email_message_body.
    *Send file by email as .xls speadsheet
    PERFORM send_file_as_email_attachment
                        tables it_message
                                it_attach
                            using p_email
        'Example . xls documnet attachment'
                                     'XLS'
                                'filename'
                        changing gd_error
                              gd_reciever.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM initiate_mail_execute_program.
    *& Form DATA_RETRIEVAL
    *Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    SELECT ebeln ebelp aedat matnr
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekpo.
    ENDFORM. " DATA_RETRIEVAL
    *& Form BUILD_XLS_DATA_TABLE
    *Build data table for .xls document
    FORM build_xls_data_table.
    *CONSTANTS: con_cret(2) TYPE c VALUE '0D', "OK for non Unicode
    *con_tab(2) TYPE c VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    class cl_abap_char_utilities definition load.
    constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
    INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach INTO it_attach.
    APPEND it_attach.
    LOOP AT it_ekpo INTO wa_charekpo.
    CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
    wa_charekpo-aedat wa_charekpo-matnr
    INTO it_attach SEPARATED BY con_tab.
    CONCATENATE con_cret it_attach INTO it_attach.
    APPEND it_attach.
    ENDLOOP.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    *Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                           using p_email
                                                p_mtitle
                                                p_format
                                              p_filename
                                        p_attdescription
                                        p_sender_address
                                    p_sender_addres_type
                                        changing p_error
                                              p_reciever.
    DATA: ld_error TYPE sy-subrc,
    ld_reciever TYPE sy-subrc,
    ld_mtitle LIKE sodocchgi1-obj_descr,
    ld_email LIKE somlreci1-receiver,
    ld_format TYPE so_obj_tp ,
    ld_attdescription TYPE so_obj_nam ,
    ld_attfilename TYPE so_obj_des ,
    ld_sender_address LIKE soextreci1-receiver,
    ld_sender_address_type LIKE soextreci1-adr_typ,
    ld_receiver LIKE sy-subrc.
    ld_email = p_email.
    ld_mtitle = p_mtitle.
    ld_format = p_format.
    ld_attdescription = p_attdescription.
    ld_attfilename = p_filename.
    ld_sender_address = p_sender_address.
    ld_sender_address_type = p_sender_addres_type.
    *Fill the document data.
    w_doc_data-doc_size = 1.
    *Populate the subject/generic message attributes
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name = 'REPORT'.
    w_doc_data-obj_descr = ld_mtitle . "mail description
    w_doc_data-sensitivty = 'F'.
    *Fill the document data and get size of attachment
    CLEAR w_doc_data.
    READ TABLE it_attach INDEX w_cnt.
    w_doc_data-doc_size =
    ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name = 'SAPRPT'.
    w_doc_data-obj_descr = ld_mtitle.
    w_doc_data-sensitivty = 'F'.
    CLEAR t_attachment.
    REFRESH t_attachment.
    t_attachment[] = pit_attach[].
    *Describe the body of the message
    CLEAR t_packing_list.
    REFRESH t_packing_list.
    t_packing_list-transf_bin = space.
    t_packing_list-head_start = 1.
    t_packing_list-head_num = 0.
    t_packing_list-body_start = 1.
    DESCRIBE TABLE it_message LINES t_packing_list-body_num.
    t_packing_list-doc_type = 'RAW'.
    APPEND t_packing_list.
    *Create 1st attachment notification
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 0.
    t_packing_list-head_num = 1.
    t_packing_list-body_start = 1.
    DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    t_packing_list-doc_type = ld_format.
    t_packing_list-obj_descr = ld_attdescription.
    t_packing_list-obj_name = ld_attfilename.
    t_packing_list-doc_size = t_packing_list-body_num * 255.
    APPEND t_packing_list.
    **Create 1st attachment notification
    *t_packing_list-transf_bin = 'X'.
    *t_packing_list-head_start = 0.
    *t_packing_list-head_num = 1.
    *t_packing_list-body_start = 1.
    *DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    *t_packing_list-doc_type = ld_format.
    *t_packing_list-obj_descr = ld_attdescription.
    *t_packing_list-obj_name = ld_attfilename.
    *t_packing_list-doc_size = t_packing_list-body_num * 255.
    *APPEND t_packing_list.
    **Create 2nd attachment notification
    data: x type i.
    DESCRIBE TABLE t_attachment LINES X.
    append lines of it_attach to t_attachment.
    data: start type i,
          end type i,
          cal type i.
    start = X + 1.
    describe table t_attachment lines end.
    cal = end - start.
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 0.
    t_packing_list-head_num = 1.
    t_packing_list-body_start = start.
    t_packing_list-body_num = end.
    *DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    t_packing_list-obj_descr = 'Eng Change'. "ld_attdescription.
    t_packing_list-doc_type = ld_format.
    *t_packing_list-obj_name = 'Eng' .
    t_packing_list-doc_size = t_packing_list-body_num * 255.
    APPEND t_packing_list.
    *Add the recipients email address
    CLEAR t_receivers.
    REFRESH t_receivers.
    t_receivers-receiver = ld_email.
    t_receivers-rec_type = 'U'.
    t_receivers-com_type = 'INT'.
    t_receivers-notif_del = 'X'.
    t_receivers-notif_ndel = 'X'.
    APPEND t_receivers.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = w_doc_data
    put_in_outbox = 'X'
    sender_address = ld_sender_address
    sender_address_type = ld_sender_address_type
    commit_work = 'X'
    IMPORTING
    sent_to_all = w_sent_all
    TABLES
    packing_list = t_packing_list
    object_header = l_t_objhead
    contents_bin = t_attachment
    contents_txt = it_message
    receivers = t_receivers
    EXCEPTIONS
    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.
    *Populate zerror return code
    ld_error = sy-subrc.
    *Populate zreceiver return code
    LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
    ENDLOOP.
    ENDFORM.
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    *Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
    WAIT UP TO 2 SECONDS.
    SUBMIT rsconn01 " WITH mode = 'INT'
    "WITH output = 'X'
    AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    *Populate message body text
    form populate_email_message_body.
    REFRESH it_message.
    it_message = 'Please find attached a list test ekpo records'.
    APPEND it_message.
    endform. " POPULATE_EMAIL_MESSAGE_BODY

  • How to configure sender mail adapter

    Hi,
    My scenario  Mail-XI-file. In adapter monitoring it is giving me error "not initialized: mail agent null". What do we exactly mean by this??
    and can anyone suggest any blog as how to configure sender mail adapter.
    Kindly help
    Anu Singhal

    Hi Anu,
    Just check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm
    and this 1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
    Rewardif helpful
    Reagards
    Sachin

  • How to configure send mail ?

    Hi,
    How to configure send mail ?
    O/S is OEL-5.8 64-bit.
    Thanks.

    Sendmail uses the M4 macro processor to compile the configuration files. There is no GUI, if that is what you are looking for.
    The configuration depends on what you want to accomplish and how email needs be routed in your environment.
    You can find many tutorials and scenarios in Google:

  • How do I send mail from an alias?

    I have a .mac mail account, and would like to send mail from an alias I created.
    Although I can receive mail to the alias, I don't know how to send from it. Does anyone know how I can send mail so that my sender's name is my alias?
    G5 imac   Mac OS X (10.4.5)  

    Joel,
    First, if you Compose a new message, confirm that you do not have an Account box below Subject, or if you do, when you click on the arrows beside it, you are not presented with a choice of your .mac alias?
    It may be that you have to click on the Edit Email Aliases button, and go, via it, to the .Mac web pages, and be sure your alias is noted by Mail, but make no changes. I have seen this question, and I do not remember when my alias was first made available. If this does not resolve, I will have to test by establishing still another one for myself, and see what is needed to get it recognized.
    Do you have any other accounts set up in Mail, besides your .mac?
    Ernie

  • How do I send mail that is sitting in my outbox?

    How do I send mail that is sitting in my outbox?  Why does some of my mail go there instead of being sent?

    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • How can i send mail

    Hello!
    how can i send mail
    Thanks, B

    Hy
    Hello!
    how can i send mailTake a closer look to the Java Mail Api, http://java.sun.com/products/javamail/
    Thanks, B\Robert

  • How to attach & send mp3 w/e-mail app?

    How do you send an mp3 as an attachment (using the iPhone 3G e-mail app) which is stored in the iPhone 3G iPod files as an attachment in an e-mail?
    I don't have a 3Gs, but a 3G w/OS 3.1

    You don't.

  • How to change Sender mail addres in sapconnect.

    Hi,
    I have searched this and i have found a thread, but i cant see it because when i click the link, giving a message "No message Found". Can you open this thread?
    https://forums.sdn.sap.com/click.jspa?searchID=738174&messageID=1287908
    Anyway, is it possible to change sender address when i am sending mail with FM SO_NEW_DOCUMENT_SEND_API1 ? How ?
    I looked at fields of structures, but i haven't found a field to change sender addres.
    Thanks
    Ibrahim

    Hi Ibrahim,
    i can't also use the Link.
    I use for sending this FM:
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOC_DATA
                PUT_IN_OUTBOX              = 'X'
                COMMIT_WORK                = 'X'
               SENDER_ADDRESS             = 'SAP_USER' "Your SAP User
               SENDER_ADDRESS_TYPE        = 'U'
           TABLES
                PACKING_LIST               = OBJ_PACK
                CONTENTS_TXT               = OBJ_TXT
                CONTENTS_BIN               = OBJ_BIN
                RECEIVERS                  = REC_LIST
           EXCEPTIONS
                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.
    Perhaps you can use this FM
    Regards, Dieter

  • How to migrate send mail addressbok

    Hi All ,
    we have sun java messaging server 7.3 directory server 6.2.we have migrated the all mail box send mail messaging server,Now how can we migrate the address book.
    Regards
    kamal

    kkdas wrote:
    we have sun java messaging server 7.3 directory server 6.2.we have migrated the all mail box send mail messaging server,Now how can we migrate the address book.Sun does not provide a "sendmail format" to Sun format addressbook migration tool.
    You could however write a script to convert the sendmail format to the appropriate Sun LDIF format and import the information manually.
    It is trivial to reverse-engineer the Sun PAB format/structure.
    You may also want to see if this user created any tools to achieve your goal:
    http://forums.sun.com/thread.jspa?messageID=10854786#10854786
    Regards,
    Shane.

  • How do I send mails using java

    I am developing a web application. Is it possible to send E-mail and SMS using Java? If yes how I can do it?
    I want to send mail. How do I send?

    you can use javamail for the email part
    http://java.sun.com/products/javamail/
    there is a forum that will interest you about the SMS part
    http://forum.java.sun.com/thread.jspa?threadID=150292
    from discussjava.com
    Message was edited by:
    discussjava.com_

  • How do I send mail with mac mail

    I cannot send mail from my iMac today even though I was able to do it yesterday. I am on Mountain Lion. The Connection Doctor says that one of the SMTP servers of all those I have used in the past is connected. (The "light" is green.) I suspect there is something wrong in the Mail Preferences, but I don't know where to start to fix this problem. When I tried troubleshooting a related mail problem a few weeks ago, I received an error message saying that more than one account was attached to that SMTP server. Does anyone know where I should start?

    Hello, StitcherLinda. 
    Thank you for visiting Apple Support Communities.
    Here is the best resource to go through when troubleshooting issues with email.
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/kb/TS3276
    Cheers,
    Jason H.

  • How can i send mail from my ipad to my email address on my computor

    how can i send e/mail from ipad to my main computor and recieve mail from my computot to my ipad, i joined iclouds with a e/mail address now nothing works

    You'd need to set that up with your mail provider
    For example, I use yahoo. Id' need to access yahoo via safari and their web interface and see what kind of forwarding or auto replies I can set up.
    The iPad mail app won't do it, it has to be done at the server level through your mail provider.

  • How can i send mail to the yahoo mail or gmail or something else

    hello guys,
    i want to know how to send mails to the yahoo or gmail or something else.i heard that we have to change some smtp address and some port number. can any body suggest me to get that.please help me
    any replies will be appreciated greatly.

    Hi chnaresh,
    This is the code I use to send mail, it's not specific to gmail, but it works. The "props" object expects the usual mail properties, "mail.smtp.host", "mail.user" or "mail.smtp.user", as well as "mail.smtp.ssl" which you'd want to set to "true" if you're using gmail. It also expects "mail.smtp.passwd" or "mail.passwd" which my gut tells me is unsafe, but I'm not sure why.
    Good luck,
    radikal_3dward
    public static int sendMail(final Properties props, String subject, String body, String to, String cc, String bcc, String from, File[] attachments, boolean toStdOut)
    throws javax.mail.internet.AddressException, javax.mail.MessagingException, javax.mail.NoSuchProviderException
    Session sess;
    //props.setProperty("mail.debug", "true");
    if(props.getProperty("mail.smtp.ssl") != null && props.getProperty("mail.smtp.ssl").equalsIgnoreCase("true"))
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    String portStr = ((props.getProperty("mail.smtp.port") != null) ? (props.getProperty("mail.smtp.port")) : "465");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.socketFactory.port", portStr);
    props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.socketFactory.fallback", "false");
    sess = Session.getDefaultInstance(props,
    new javax.mail.Authenticator()
    protected PasswordAuthentication getPasswordAuthentication()
    String userName = ((props.getProperty("mail.smtp.user") != null) ? props.getProperty("mail.smtp.user") : props.getProperty("mail.user"));
    String passwd = ((props.getProperty("mail.smtp.passwd") != null) ? props.getProperty("mail.smtp.passwd") : props.getProperty("mail.passwd"));
    if(userName == null || passwd == null)
    return null;
    return new PasswordAuthentication(userName , passwd);
    else
    String portStr = ((props.getProperty("mail.smtp.port") != null) ? (props.getProperty("mail.smtp.port")) : "25");
    sess = Session.getInstance(props, null);
    //sess.setDebug(true);
    MimeMessage mess = new MimeMessage(sess);
    mess.setSubject(subject);
    StringTokenizer toST = new StringTokenizer(to, ",;");
    while(toST.hasMoreTokens())
    Address addr = new InternetAddress(toST.nextToken());
    mess.addRecipient(Message.RecipientType.TO, addr);
    if(from != null)
    StringTokenizer fromST = new StringTokenizer(from, ",;");
    InternetAddress[] fromAddrs = new InternetAddress[fromST.countTokens()];
    for(int i = 0; fromST.hasMoreTokens(); i++)
    fromAddrs[i] = new InternetAddress(fromST.nextToken());
    mess.addFrom(fromAddrs);
    if(cc != null)
    StringTokenizer ccST = new StringTokenizer(cc, ",;");
    while(ccST.hasMoreTokens())
    Address addr = new InternetAddress(ccST.nextToken());
    mess.addRecipient(Message.RecipientType.CC, addr);
    if(bcc != null)
    StringTokenizer bccST = new StringTokenizer(bcc, ",;");
    while(bccST.hasMoreTokens())
    Address addr = new InternetAddress(bccST.nextToken());
    mess.addRecipient(Message.RecipientType.BCC, addr);
    BodyPart messageBodyPart = new MimeBodyPart();
    Multipart multipart = new MimeMultipart();
    if(body != null)
    messageBodyPart.setText(body);
    multipart.addBodyPart(messageBodyPart);
    if(attachments != null)
    for(int i = 0; i < attachments.length; i++)
    messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(attachments);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(attachments[i].getName());
    multipart.addBodyPart(messageBodyPart);
    mess.setContent(multipart);
    Address[] allRecips = mess.getAllRecipients();
    if(toStdOut)
    System.out.println("done.");
    //System.out.println("Sending message (\"" + mess.getSubject().substring(0,10) + "...\") to :");
    System.out.println("Sending message (\"" + mess.getSubject() + "...\") to :");
    for(int i = 0; i < allRecips.length; i++)
    System.out.print(allRecips[i] + ";");
    System.out.println("...");
    Transport.send(mess);
    if(toStdOut)
    System.out.println("done.");
    return 0;

Maybe you are looking for

  • Write to measurement file note: x values only guaranteed for one data signal?

    Hi everyone, Attached is a vi I have developed... When I save the data my .lvm file has a note in the header than says" X values only guaranteed for Power (Filtered)".... Power is one of 9 signals... I am not sure what this note means, but I assume t

  • TS3572 Ipod shuffle not detected

    Hi, when I plug my ipod shuffle 4th generation into my computer I see an orange light to show me the ipod is charging, but itunes won't detect it. What can I do ? Thanks for your help

  • INDEX GETTING UNUSABLE

    Hello everybody, I'm using Oracle 9i and I'm getting below error when I execute a anonymous block which runs through the cursor and updates the table. ORA-01502: index 'ASAP.PK_STATUS_NO' or partition of such index is in unusable state select query o

  • How can v see all vndors

    Hi , How can v see all vendor balaces at a time

  • Oracle Determinations Engine Data Source Connector for Batch Processing?

    I have been trying to find +"Oracle Determinations Engine Data Source Connector"+. I have OPA 10.2 installed. Where can I find this in the installation directory? or Does it not come as a part of the standard installation?