Hw to write txt in mail body using UTL mail when sending mail with attachme

hi all
i m using oracle demo mail package to send csv file as attachment to different users its successfull and i can also able to attach text file to it
but i m unable to write any text in mail body .
e.g.
mail body can be--
hi
This is test mail.
Regds
Sender.
can anyone suggest some way?

u can try this code
this code takes the file from database and attach with mail and also send the body with it
it works fine.
CREATE OR REPLACE
procedure pdf_mail(
p_sender varchar2, -- sender, example: 'Me '
p_recipients varchar2, -- recipients, example: 'Someone '
p_subject varchar2, -- subject
p_text long, -- text
p_case_id number,
p_email_log_id number
-- p_filename varchar2, -- name of pdf file
p_blob   blob     pdf file
) is
conn utl_smtp.connection;
i number;
len number;
p_message_part varchar2(32767);
cursor c1 is
select file_name,document_pic
from clm_case_attachments ca,email_log_detail em
where
case_id = p_case_id
and ca.CASE_ATTACHMENT_ID = em.ATTACHMENT_ID
and em.ACTIVE = 'Y'
and em.EMAIL_LOG_ID = p_email_log_id;
BEGIN
conn := demo_mail.begin_mail(
sender => p_sender,
recipients => p_recipients,
subject => p_subject,
mime_type => demo_mail.MULTIPART_MIME_TYPE);
demo_mail.attach_text(
conn => conn,
data => p_text,
mime_type => 'text/html');
for lp in c1 loop
demo_mail.begin_attachment(
conn => conn,
mime_type => 'application/pdf',
inline => TRUE,
filename => lp.file_name,
transfer_enc => 'base64');
-- split the Base64 encoded attachment into multiple lines
i := 1;
len := DBMS_LOB.getLength(lp.document_pic);
WHILE (i < len) LOOP
IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(lp.document_pic, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
ELSE
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(lp.document_pic, (len - i)+1, i)));
END IF;
UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
END LOOP;
demo_mail.end_attachment(conn => conn);
end loop;
demo_mail.end_mail( conn => conn );
END;
/

Similar Messages

  • Mail uses wrong identity when sending mail but only in a very specific case

    Hey there we have a very strange thing happening here. There are two accounts in apple mail. user 1 is set as the default account and when user 1 replies to email sent to him it works as it should. When email is sent to user 2 and he replies it works correctly as well. But when an email comes addressed to both user 1 and user 2 and user 1 replies it is being sent as user 2 not user 1. Any ideas on what is causing this?
    Thanks for your help

    When both addresses in the To header are setup in Mail, Mail defaults to choose the first address listed in the distribution. You have to manually change that, or have separate User Accounts on this Mac for each user, and in that case each user would only setup his/her account.
    Ernie

  • Mail doesn't indicate anything when sending message with attachment

    I'm sure that in the past, when a message was sent that contained an attachment (or was just big) there would be some indication that the message was still sending before you heard the 'woosh' sound to confirm the message had been sent. I just sent something with a 500k attachment. It took a few seconds to go of course, but during that time I could see no visual indication that Mail was still doing anything, until eventually the 'woosh' confirmed it had gone. Is there something I've failed to choose as a preference?

    Many people have reported in this forum that for them Sent didn’t change to Sending... as it’s supposed to while a message is being sent:
    http://discussions.apple.com/search.jspa?q=Sent%26%26Sending&objID=f753
    The problem usually affects Intel-based Macs, but the two Macs that appear in your profile are PowerPC-based...
    I’ve never seen a solution for this problem.

  • Spinning wheel not showing when sending mail

    Hello,
    I recently gave my older iMac G5/2GHz to my Mom and got her all set up - I transferred all of her documents and photos from her old original iMac G3/350 to the "new" iMac G5/2GHz. The iMac G5/2GHz has a very clean and up-to-date Mac OS X 10.4.11 on it. I used the iMac G5/2GHz right up until I got my new iMac 3.06 GHz Intel Core 2 Duo a few weeks ago.
    I deleted all the prefs files and related files and folders from Mail 2.1.3 and started off with a "fresh" copy of Mail 2.1.3. I then imported all her e-mail messages, folders and addresses from her old version of Outlook Express 5.0.6. I had a few problems with the import but I got it all straightened around (she had a few mail folders named with either a colon ":" or a slash "/" in them so I got that straightened out and everything worked fine afterward).
    But there's a strange problem happening with Mail 2.1.3 when she sends e-mails now. I am used to seeing the little "spinning wheel" to the right of the "Sent" mailbox when sending an e-mail to someone and the word "Sent" actually always seemed to change to "Sending" while mail was being sent but it doesn't do that anymore. The only way we can tell what's happening when sending e-mail is to open the Activity window from Mail's "Window" menu.
    Has anyone else encountered this problem and is there any way you may know of to fix it so that we can see the "progress" (the "spinning wheel") of the mail being sent to the right of the "Sent" mailbox (without having to use the "Activity" window)?
    All of her messages send and receive no problem but I can't, for the life of me, figure out why we can't see the progress of mail being sent out (we can see the progress spinning to the right of the Inbox when checking mail but nothing shows up when sending mail).
    Thanks in advance for your help.
    Gerard

    Hi Gerard,
    Yes it can, first I'd try this...
    Right click on that Mail folder, choose archive, you'll get everything in the folder, and the folder itself in a file called Mail.zip, move it to a safe place, same for the Mail Downloads folder... only the plist is separate.
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    (Deleting may or may not require you to setup your account(s) again.)
    Quit Mail, then In your home folder, try moving this +folder & file+ to the Desktop then reboot...
    First, Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move these +folder & file+ to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.

  • HT201320 I have IOS 7 5S and using mail. Receiving works great. Sending mail will not work. Using Centurylink. On my IOS 6 Iphone 4 it works great. Compared settings and they are identical. Now what?

    I have IOS 7 5S and using mail. Receiving works great. Sending mail will not work. Using Centurylink. On my IOS 6 Iphone 4 it works great. Compared settings and they are identical. Now what?

    Well, this is a recurring issue for many users...a small percentage of users but still a bug.  Report the issue here to Apple:  www.apple.com/feedback
    iOS7.0.3 will be released next week, which as of now, I know is primarily for an iMessage but hopefully it will clear up some of these email issues some are also having.

  • After updating my iPhone 4 to 5IOS my letters from my mail(i use google) does not send

    After updating my iPhone 4 to 5IOS my letters from my mail(i use google) does not send

    I tried that but I still got the message "Unable to verify account information."  I saved it anyway and when I go to the Exchange email account it says "Cannot Get Mail" "The connection to the server failed."  We are running Microsoft Exchange 2010 and I was always able to sync my calendar and email before I upgraded to IOS 6.

  • Subject line 'space' character is lost when sending mail?

    Hi,
    I'm using JavaMail, and when sending a mail with a subject line that is longer than 62 characters, the last space before the 63rd character becomes a linefeed. This means that when the recipient receives the e-mail, the space in the subject line is actually dropped (becomes a linefeed).
    For example. I send an email with the following subject line: "New User Setup [ITNUS-0005] User Setup Progress Report for: Louise Gans".
    The recipient will receive the following subject: "New User Setup [ITNUS-0005] User Setup Progress Report for: LouiseGans".
    Note the missing space between "Louise Gans". Perhaps someone could test sending out that subject line, and see if they get the same problem?
    Looking at the message source on the recipient client, it shows a line feed / new line where that space is supposed to be.
    Using MS Outlook or GroupWise or another mail client, the subject lines gets sent through perfectly using the same mail server (Groupwise Internet Agent 7.0.3), but using JavaMail to send the mail through that mail server gives me the space problem.
    Can anybody shed some light on why this is happening? I would really appreciate the help.
    Here is an example of the code I am testing with:
    public class SendHtml {
         public static void main(String[] argv) {
              new SendHtml();
         public SendHtml() {
              String  to = "[email protected]";
              String subject = "New User Setup [ITNUS-0005] User Setup Progress Report for: Louise Gans";
              String from = "[email protected]";
              String cc = null;
              String bcc = null;
              String url = null;
              String mailhost = "mail.server.co.za";
              String mailer = "sendhtml";
              String protocol = null, host = null, user = null, password = null;
              String record = null;     // name of folder in which to record mail
              boolean debug = false;
              BufferedReader in =
                   new BufferedReader(new InputStreamReader(System.in));
              try {
                   Properties props = System.getProperties();
                   if (mailhost != null) {
                        props.put("mail.smtp.host", mailhost);
                   // Get a Session object
                   Session session = Session.getInstance(props, null);
                   // construct the message
                   Message msg = new MimeMessage(session);
                   if (from != null) {
                        msg.setFrom(new InternetAddress(from));
                   else {
                        msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO,
                             InternetAddress.parse(to, false));
                   if (cc != null)
                        msg.setRecipients(Message.RecipientType.CC,
                                  InternetAddress.parse(cc, false));
                   if (bcc != null)
                        msg.setRecipients(Message.RecipientType.BCC,
                                  InternetAddress.parse(bcc, false));
                   msg.setSubject(subject);
                   collect(in, msg);
                   msg.setHeader("X-Mailer", mailer);
                   msg.setSentDate(new Date());
                   // send the thing off
                   Transport.send(msg);
                   System.out.println("\nMail was sent successfully.");
                   // Keep a copy, if requested.
                   if (record != null) {
                        // Get a Store object
                        Store store = null;
                        if (url != null) {
                             URLName urln = new URLName(url);
                             store = session.getStore(urln);
                             store.connect();
                        } else {
                             if (protocol != null)          
                                  store = session.getStore(protocol);
                             else
                                  store = session.getStore();
                             // Connect
                             if (host != null || user != null || password != null)
                                  store.connect(host, user, password);
                             else
                                  store.connect();
                        // Get record Folder.  Create if it does not exist.
                        Folder folder = store.getFolder(record);
                        if (folder == null) {
                             System.err.println("Can't get record folder.");
                             System.exit(1);
                        if (!folder.exists())
                             folder.create(Folder.HOLDS_MESSAGES);
                        Message[] msgs = new Message[1];
                        msgs[0] = msg;
                        folder.appendMessages(msgs);
                        System.out.println("Mail was recorded successfully.");
              } catch (Exception e) {
                   e.printStackTrace();
         public void collect(BufferedReader in, Message msg)
         throws MessagingException, IOException {
              String line;
              String subject = msg.getSubject();
              StringBuffer sb = new StringBuffer();
              sb.append("<HTML>\n");
              sb.append("<HEAD>\n");
              sb.append("<TITLE>\n");
              sb.append(subject + "\n");
              sb.append("</TITLE>\n");
              sb.append("</HEAD>\n");
              sb.append("<BODY>\n");
              sb.append("<H1>" + subject + "</H1>" + "\n");
              sb.append("</BODY>\n");
              sb.append("</HTML>\n");
              msg.setDataHandler(new DataHandler(
                        new ByteArrayDataSource(sb.toString(), "text/html")));
    }

    The header is being "folded" as described in RFC 2822 section 2.2.3.
    The folding doesn't lose the space if unfolding is done properly.
    Perhaps the recipient mail program isn't handling unfolding properly?
    If so, please report the bug to the owner of that program.
    If you need to work around such a buggy program, you can set the
    System property "mail.mime.foldtext" to "false" to disable all folding
    in JavaMail.

  • Textarea problem when sending mail (only Firefox)

    When sending mail using textarea item with multiple lines, carriage returns are taken away in resulting mail when sent in Firefox, but not in IE.
    To send mail, I call Javascript function that gets textarea value ($v or $x.innerHTML give the same result) and calls then on-demand process that calls in turn APEX_MAIL function.
    Igor

    Thank you, Jari!
    "pre" did the trick. Line breaks are OK now.
    There is one small inconvenience, though: font becomes Courrier instead of sans-serif type. But this is less disturbing than missing line breaks.
    Igor

  • I want to bcc myself when sending mail from one account but not another. When I check "automatically bcc myself", it bcc's me from both accounts.  Can I set this to work with only one account?

    I have two mail accounts on my Mac.  I want one account to bcc me when I send emails from that account.  I checked "automatically bcc myself" under mail>preferences>composing, but both accounts bcc me when sending mail.  Can I set this to only bcc myself from one specific email account? Thanks.

    It does not make sense that your ssh does not have a dash capital Y (-Y) option. It is in "man ssh", and my 10.6.6 has the -Y option, and I've had a -Y option since at least Tiger (10.4) days.
    My ssh is in /usr/bin/ssh
    I'm not very good at X11 issues, so I'm just throwing ideas out there.
    Does your broken account have a $HOME/.ssh/config file, and if so, what is in it?
    Does the broken account have any $HOME/.x* or $HOME/.X* files that X11 might be reading to configure your X11 behavior differently from the new test account?
    $HOME/.Xauthority
    $HOME/.Xdefaults-<hostname>
    $HOME/.Xresources
    $HOME/.ICEauthority
    $HOME/.keymap.km
    The above are a few names I found looking through "man X"
    While I'm thinking about it, I assume that when going to the server, you are using the exact same user account on the server, so that you have a constant at least at that end.
    Have you tried trashing your
    $HOME/Library/Preferences/org.x.X11.plist
    file, to see if that is affecting the broken account?
    Again, I am just throwing out ideas to see if anything sticks.

  • "smtp error" in webmail when sending mails

    Hello,
    "smtp error" in webmail when sending mails
    why?

    With the very little data offered, I can only give a general idea.
    "smtp error" usually means that webmail isn't pointed to a smtp server for sending out mails.
    Webmail normally (by default) points to the same box it's on for sending mails out. You can change the host and port with configutil.
    Some versions of webmail must point to iMS, and other mail servers won't work. Since I have no idea what version you have, I can't tell if this is a problem.
    Did it ever work?
    What version are you using?

  • Can I use DeliveryManager just to send email with no document?

    Can I use "oracle.apps.xdo.delivery.DeliveryManager" to just send email without any document attached? or
    Is this only used to deliver the documents by email?
    I just want to use DeliveryManager just to send email with content in the body of the email. I am using BI Publisher API.
    Can any of you provide sample input for the above?

    Hi,
    You can use iMovie to record the message and save it as an email sized item and send the file as email like before.
    For those iChat AV users without a Cam and the AIM users without a cam you can do One-Way Viedo chats.
    Once you have a recorded Video file you can also drop the file on any Buddies name in you iChat Buddy list rather than using email.
    For those using other services you can set up a Jabber account and enable the required Transport/Gateways and send the files that way.
    http://www.jabber.org.au/ichat = Australian Page
    AllForces
    These are the two main information pages on how iChat can connect to the other IM services.
    Jabber Public Server list
    That would appear to be everybody.
    Ralph

  • Java.lang.NumberFormatException when sending mails

    Gurus,
    I am using java mail 1.4 to send mails from my application and the code to do so is
        public void postMail(String recipient, String message) {
            logger.fine("in postMail method..");
            boolean debug = true;
            Properties props = new Properties();
            props.put("mail.transport.protocol", "smtp");
            props.put("mail.smtp.host", ConfigProperty.getProperty("mail.smtp.host"));
            props.put("mail.smtp.auth","true");
            props.put("mail.smtp.port", ConfigProperty.getProperty("mail.smtp.port"));
            props.put("mail.smtp.from", ConfigProperty.getProperty("mail.from"));
            Session session = Session.getDefaultInstance(props, null);
            session.setDebug(debug);
            Message msg = new MimeMessage(session);
            try {
                String from = ConfigProperty.getProperty("mail.from").trim();
                InternetAddress addressFrom = new InternetAddress(from);
                msg.setFrom(addressFrom);
                InternetAddress addressTo = new InternetAddress(recipient);
                msg.addRecipient(Message.RecipientType.TO, addressTo);
                msg.setSubject(ConfigProperty.getProperty("mail.subject"));
                msg.setContent(message, "text/plain");
                logger.info("Sending mail now...............................");
                Transport trans = session.getTransport("smtp");
                trans.connect("casarray.arg.ae",username,password);
                trans.send(msg);
            } catch (Exception e) {
                e.printStackTrace();
        }However i am getting the strange error when sending mails. My email is is very simple [email protected]
    Please help me understand the issue here
    java.lang.NumberFormatException: For input string: ""
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:470)
         at java.lang.Integer.parseInt(Integer.java:499)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:398)
         at javax.mail.Service.connect(Service.java:288)
         at javax.mail.Service.connect(Service.java:169)
         at com.roadMiles.view.util.EmailNotification.postMail(EmailNotification.java:54)
         at com.roadMiles.view.unsecure.page.bean.LoginPageBean.forgotPassword(LoginPageBean.java:180)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:788)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:306)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    The error message is telling you exactly what's wrong:
    java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:470)
    at java.lang.Integer.parseInt(Integer.java:499)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:398)
    at javax.mail.Service.connect(Service.java:288)
    at javax.mail.Service.connect(Service.java:169)
    at com.roadMiles.view.util.EmailNotification.postMail(EmailNotification.java:54)At line 54 of EmailNotification.java (which I assume is your class), you're calling connect(), but that fails, because, deeper down, it's trying to parse the empty String ("") as a number. So don't pass the empty String to connect(); pass a valid number instead.

  • Getting mail authentication errors for outlook user sending mail

    When Outlook 2010 user attempts to use port 587 to send mail (to himself at this point), we see the following in the server logs:
    (User in question can attach to file shares on the same server just fine from his Windows laptop)
    Outlook config for outbound server is "port: 587, encryption TLS"
    When we connect, we get "connection interrupted by server"
    Tried other encryption methods - outlook 2010 states that server does not support the other methods (None, SSL)
    SMTPD Logs
    Jul 29 22:22:58 <servername>.l-n-l.com postfix/smtpd[2306]: connect from <Outlook Client Name>[<Outlook ClientAddr>]
    Jul 29 22:22:58 <servername>.l-n-l.com postfix/smtpd[2306]: error: validate response: error: Authentication server failed to complete the requested operation.
    Jul 29 22:22:58 <servername>.l-n-l.com postfix/smtpd[2306]: error: validate response: authentication failed for user=colin (method=DIGEST-MD5)
    Jul 29 22:22:58 <servername>.l-n-l.com postfix/master[1407]: warning: process /usr/libexec/postfix/smtpd pid 2306 killed by signal 6
    Jul 29 22:22:58 <servername>.l-n-l.com postfix/master[1407]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    Jul 29 22:24:12 <servername>.l-n-l.com postfix/smtpd[2270]: timeout after END-OF-MESSAGE from localhost[127.0.0.1]
    Jul 29 22:24:12 <servername>.l-n-l.com postfix/smtpd[2270]: disconnect from localhost[127.0.0.1]
    Meanwhile: Mac clients are able to connect to smptd submission port to send mail with no problems. Based on what the logs say, it appears that the Mac mail is using a different authentication mechanism.
    Client config for outbound server is "use custom port: 587, Use SSL:Checked, Authentication: MD5 Challenge-Response"
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/smtpd[2261]: connect from <Mac Client Name>[<MacClientAddr>]
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/smtpd[2261]: 721FCEC991: client=<Mac Client Name>[<MacClientAddr>], sasl_method=CRAM-MD5, sasl_username=<username>@l-n-l.com
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/cleanup[2267]: 721FCEC991: message-id=<[email protected]>
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/qmgr[1800]: 721FCEC991: from=<[email protected]>, size=573, nrcpt=1 (queue active)
    Jul 29 22:19:12 <servername>.l-n-l.compostfix/smtpd[2270]: connect from localhost[127.0.0.1]
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/smtpd[2270]: E722AEC9A0: client=localhost[127.0.0.1]
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/cleanup[2267]: E722AEC9A0: message-id=<[email protected]>
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/qmgr[1800]: E722AEC9A0: from=<[email protected]>, size=994, nrcpt=1 (queue active)
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/smtp[2268]: 721FCEC991: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.55, delays=0.06/0.01/0.01/0.48, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E722AEC9A0)
    Jul 29 22:19:12 <servername>.l-n-l.com postfix/qmgr[1800]: 721FCEC991: removed
    Jul 29 22:19:13 <servername>.l-n-l.com postfix/pipe[2273]: E722AEC9A0: to=<[email protected]>, relay=dovecot, delay=0.13, delays=0/0.01/0/0.12, dsn=2.0.0, status=sent (delivered via dovecot service)
    Jul 29 22:19:13 <servername>.l-n-l.com postfix/qmgr[1800]: E722AEC9A0: removed
    Jul 29 22:20:12 <servername>.l-n-l.com postfix/smtpd[2261]: disconnect from <Mac Client Name>[<MacClientAddr>]
    Running OS X 10.8.4 with Server 2.2.1.
    Any thoughts on what I need to do to make OSX Server mail play nice with Outlook over the submission port?
    Thanks in advance!!

    Ok - so I think I have it almost all sussed. So for all 3 of you who might be reading this, here is what is going on.
    1) As I expected, this has nothing to do with the FQDN/Outlook problem. I actually rejoiced when I finally got far enough to have that problem with my Outlook 2007 and 2010 clients. And I don't like the recommended fix for that either. There is another way - more on that in a minute.
    2) This problem was all about authentication methods. At present, I have OS X Mail Server set for plain text and APOP only. I will be working to fix this soon - but at present I am unable to find any other combination that permits both Mac Mail and Outlook clients to authenticate properly. Mac Mail wants to use CRAM-MD5 by default. Outlook is so incompatible with CRAM-MD5 that even when there are other authentication methods available on the mail server, if CRAM-MD5 is selected on the Server then Outlook fails miserably no matter how you configure the Outlook client. Caveat: this is my own observation and I still have some experimenting to do. If you know otherwise (or can confirm more definitively), then please speak up!
    So here is the working configuration at present:
       A) Mail Server authentication set to Custom with PlainText and APOP selected, all others blank.
       B) Firewall permits inbound from ports 25 (for mail from "outside"), 587 (submission for authenticated users, TLS) 993 (SSL IMAP), and 995 (SSL POP).
       C) Mac POP Clients:
          i) For retrieval (POP) In advanced settings, use Port 995, Check "Use SSL", Select APOP for authentication.
          ii) For submission (SMTP) : Set port 587 (only), Set Authentication to "Password"
        D) Outlook 2007,2010,2013 clients
           i) For retrieval (POP), Set "Require secure logon using SPA"
          ii) In "More Settings/Outgoing Server" set it to require authentication with same credentials as inbound
         iii) In "More Settings/Advanced"
             a) Turn on Encryption for the POP3, this should change the port to 995 automatically. If it does not, fix that too.
             b) Set outgoing server to 587
             c) Set TLS for the encryption type (nothing else will work here)
    Once you do 2.A, 2.B, 2.D, you will THEN, finally encounter the FQDN problem.
    3) So Apple and a lot of folks here in the forums resolve the FQDN problem by removing one of the restrictions:
        Remove "reject_non_fqdn_helo_hostname" from "smtpd_helo_restrictions" in your postfix main.cf file.
    I have at least 2 problems with this:
       A) It removes yet another little bit of security from the setup
       B) It involves non-GUI changes to the config...which is dangerous if you use the GUI, as changes within the GUI will often result in overwrites to your changes outside the GUI. So you can easily lose this fix without being aware of it until one of your Outlook users starts screaming.
    The problem is really with Outlook and Windows not sending the FQDN in the first place. So how about we force them to do that instead? It turns out not to be too hard. I found a thread somewhere that goes into this and it works. Further, the solution remains on through reboots AND also can be made part of an automated deployment of a standard config. The only gotcha is you have to edit the registry...so you have to be careful. You only need to do this ONCE though, and the two entries are easy to find.
      C) Under HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/Tcpip/Parameters
           i) Set Hostname to the FQDN of your host (replace HOST with HOST.domain.com - or .net, or whatever)
          ii) Set NV Hostname to the FQDN of your host
          iii) Close Regedit and Reboot to have the changes take effect
    Once you do this, the FQDN problem for Outlook users goes away.
    So I am looking for suggestions to make the SMTP submission more secure. Aside from that, things are working - and I have had to make ZERO changes to config files outside of the Server GUI - a plus as far as I am concerned.

  • Out of office message when sending mail to Lotus Notes from SAP

    Hi,
    Is it possible to have an 'out of office' message when sending mail to Lotus Notes from SAP?
    I'm sending account statements by mail via a modified version of function FI_OPT_ARCHIVE_CORRESPONDENCE. The SAP username is send as a parameter, and later converted to the e-mail saved in the user profile. This works, - but I would like to have an out of office reply if the user I send to is out of office.
    Hope someone can help...
    Regards,
    Lene

    As Thomas pointed out, you can use regular SMTP mail to send the contents to Lotus Notes. You can use the function module SO_OBJECT_SEND or any of the SAP Office function modules to do this.
    Only thing to remember is that the SMTP may have been disabled by your basis team due to security risks involved. An alternative could be a lotus notes connector available from IBM.
    Srinivas

  • I am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???

    i am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???
    APPLE need to do something here!!!!!!1

    Hi...
    Thanks for your repaly .
    and i am not bale to post a question in developer forum i tried hard but i didnt get .Can you plz explain me how to post a question in developer forum this is very helpfull for me.Because i never did this thing.

Maybe you are looking for

  • Report Name for 109 mvt against PO no

    HI Anybody can tell me which report give the 109 movement no against the po no. Thanks

  • N79 Unable to perform Bluetooth Operation

    My 5 months old N79 developed a very annoying problem 3 days ago as it kept on giving me 'Unable to perform Bluetooth Operation' each time I tried to swith the Bluetooth on, Also the FM Radio refuses to power on too. I'm just so disturbed with these

  • Hints and questions on how to do a good battery maintenance

    Some minutes ago, my (now) old battery reached the 0%-charge point. I had bet the MBP could not stay on anymore but instead, surprisingly, it supported the 0-charge "stress point". I was waiting for it to go to -1% charge but it didn't happen since I

  • Email oddities

    I'm new to Verizon e-mail and want to confirm some odd features I've noticed. First, it seems only messages in the Inbox can be moved to a folder. I see no way to move messages from Drafts to a folder. Second, when I copy something, I cannot right-cl

  • Re: Restricted Libraries Gone Wild....

    I restricted all 3gl libraries so that they would be locked into their required platforms. I insulated the restricted components from the rest of the application with service objects which are not restricted. All objects returned, or passed out of th