SMTP Relaying Error Must Issue STARTTLS

All:
I'm using OS X server 10.6 and have configured mail services to relay mail thru my gmail account using my gmail account with authentication. But when I send mail I get a 'must issue STARTTLS command' from the gmail server. I set mail services to use SSL and use authentication.
Anyone had this problem or is relaying thru an ISP ? If so, how did you set things up ?
Dennis

I set the +smtptls_securitylevel = may+
I am now getting a failure in the log:
{quote}Jan 20 09:15:36 maria postfix/pipe[23607]: 245C6556808: to=<[email protected]>, relay=dovecot, delay=0.08, delays=0.05/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failure){quote}
Is there a way to set the port to:
{quote}Port for TLS/STARTTLS: 587
Port for SSL: 465 {quote}
I do not see it in the file /etc/postfix/main.cf nor in the GUI.
Edit: I added the port at the end:
smtp.gmail.com:587
and then got this error:
{quote}Jan 20 09:23:52 maria postfix/smtp[23837]: certificate verification failed for smtp.gmail.com[74.125.159.109]:587: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Jan 20 09:23:52 maria postfix/smtp[23837]: warning: SASL authentication failure: No worthy mechs found
Jan 20 09:23:52 maria postfix/smtp[23837]: 819B8556847: to=<[email protected]>, relay=smtp.gmail.com[74.125.159.109]:587, delay=0.69, delays=0.01/0.1/0.57/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.159.109]: no mechanism available)
{quote}
Message was edited by: gilsurf

Similar Messages

  • ORA-29279: SMTP permanent error: 503 Issue MAIL FROM: command before RCPT T

    Hi all, i have a procedure called proc_send_mail, the procedure obviously, send a mail using utl_smpt. I use that procedure in many clients and just in one of them, i got this error (ORA-29279: SMTP permanent error: 503 Issue MAIL FROM: command before RCPT T).
    Here is my code:
    recStat := utl_smtp.helo(c, vServidor);
    vStatus := nvl(vStatus,'') || to_char(recStat.code) ||' '|| recStat.text;
    dbms_output.put_line('Status:'||vStatus);
    recStat := utl_smtp.mail(c, p_address_from);
    vStatus := nvl(vStatus,'') || to_char(recStat.code) ||' '|| recStat.text;
    dbms_output.put_line('Status3:'||vStatus);
    dbms_output.put_line('p_address_from:'||p_address_from);
    dbms_output.put_line('p_address_to:'||p_address_to);
    utl_smtp.rcpt(c, p_address_to);
    vStatus := nvl(vStatus,'') || to_char(recStat.code) ||' '|| recStat.text;
    dbms_output.put_line('Status2:'||vStatus);
    -- This is the message
    vMensagem := 'MIME-Version: 1.0' || chr(13) || chr(10);
    vMensagem := vMensagem ||'From: '|| p_mail_from ||' <'|| p_address_from ||'>'|| chr(13) || chr(10);
    vMensagem := vMensagem ||'Subject: '|| p_subject || chr(13) || chr(10);
    vMensagem := vMensagem ||'To: '|| p_mail_to ||' <'|| p_address_to ||'>'|| chr(13) || chr(10);
    vMensagem := vMensagem ||'Reply-To: '|| p_address_from || chr(13) || chr(10);
    So, i call:
    - utl_smtp.helo
    - utl_smtp.mail
    - utl_smtp.rcpt -----> in this i have trouble
    anyone can help me? I check the mail from and mail to, and they are correct.
    P.S: Sorry, my english is too bad.

    Hi,
    Many mail server provides like gmail use TLS/SSL for mail transmission. The error suggest your mail server is expecting a TLS/SSL connection.
    The TLS/SSL connection is not part of the UTL_SMTP and UTL_MAIL API. You have to either use Wallet as described here http://oracleblues.blogspot.in/2010/09/11g-release-2-11202-new-utlsmtp.html or use a third party tunneler like stunnel as described here http://monkeyonoracle.blogspot.in/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
    Cheers,

  • "An error occured while sending mail. The server responded....5.7.0. Must issue STARTTLS......"What's wrong?

    I cannot send emails via FireFox, must go to native provider to send. Inconvenient!

    It's possible that your provider has made a change.
    I think STARTTLS usually is used with port 587, instead of the standard SSL port 465.
    Could you look up your provider's current SMTP settings to see whether your "Outgoing Server" settings need to be updated? If it's difficult to translate between your provider's help page and Thunderbird's dialog controls, you could provide a link to your provider's help page.

  • Smtp relaying error - all of a sudden

    In the last week or so, Apple Mail.app has started throwing a "relaying denied" message for mail outbound through smtp-server.nyc.rr.com.
    I am not in fact relaying -- this is the smtp server specified (no password) for my own ISP. And nothing about my Mail settings has changed since this began happening. However, and this may be a hint, I think Mail.app may have been updated by an Apple security update during this period.
    Oddly, choosing "try later" (which saves it to the outbox) and then opening it again and sending it again *always succeeds.* This is an error that's thrown only the first time "send" is hit.
    Any ideas? Thanks in advance.
    Mac Mini   Mac OS X (10.4.8)  

    It might be an authentication issue. Some SMTP servers will only accept mail if there has been an authenticated POP connection from your IP address within the last 15-20 minutes. Maybe they have changed their timeout.
    AK

  • Smtp relay error SJES 2005Q4

    Hi,
    In SJES 2005Q4 ....the switching to tcp_auth does not happen ......
    I have done the setting as per admin guide.....
    ============
    ! tcp_local
    tcp_local smtp mx single_sys remotehost inner switchchannel subdirs 20 maxjobs 7 pool SMTP_POOL mayt
    lsserver maysaslserver saslswitchchannel tcp_auth missingrecipientpolicy 0
    tcp-daemon
    ! tcp_intranet
    tcp_intranet smtp nomx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserv
    er allowswitchchannel saslswitchchannel tcp_auth missingrecipientpolicy 4
    tcp_intranet-daemon
    ! tcp_submit
    tcp_submit submit smtp mx single_sys mustsaslserver maytlsserver missingrecipientpolicy 4
    tcp_submit-daemon
    ! tcp_auth
    tcp_auth smtp mx single_sys mustsaslserver missingrecipientpolicy 4
    tcp_auth-daemon
    ==========
    Now a hosted user ......sends mail from a IP which does not fall in INTERNAL MAPPING IP ....he is sending this mail out .......and is doing authentication....
    But the mail.log logs show relaying not allowed ....
    550 5.7.1 Relaying not allowed:
    On checking the logs further ..I see there is no switching to tcp_auth ..channel ..therefore tcp_local ==> tcp_local is treated as relaying....
    WHY DOES'NT the switching to tcp_auth happen ...when a user tries to send mail to non-hosted Domain ...and uses SMTP AUTH...????
    This would happen in iMS5.2 without any setting>>>
    imsimta version
    Sun Java(tm) System Messaging Server 6.2-4.03 (built Sep 22 2005)
    libimta.so 6.2-4.03 (built 04:37:42, Sep 22 2005)
    SunOS mta 5.9 Generic_118558-14 sun4u sparc SUNW,Ultra-80
    Don't have any clues ..here ??
    HAS anybody tried the SMTP AUTH...
    Thanks

    Think you're already getting good response on the other list.
    2. About SMTP AUTH - you need to exclusively turn on this capability on
    MTA side, file imta.cnf,
    include maysaslserver on specific channels such as tcp_intranet,
    tcp_local.
    Compile the MTA configuration with imsimta cnbuild followed by
    imsimta restart
    ==================================================================
    Well,
    By default this is enabled on Backend Server ...and I think it is
    always enabled by default...
    On my MTA the default settings in imta.cnf are already set for SMTP auth
    ....as per Admin guide
    IMTA.CNF
    defaults logging notices 1 2 4 7 copywarnpost copysendpost postheadonly
    noswitchchannel immnonurgent maxjobs 7 defaulthost domain.com domain.com
    Note the default noswitchchannel in the defaults above ....then
    ! tcp_local
    tcp_local smtp mx single_sys remotehost inner switchchannel subdirs 20
    maxjobs 7 pool SMTP_POOL maytlsserver maysaslserver saslswitchchannel
    tcp_auth missingrecipientpolicy 0
    tcp-daemon
    Now I have switchchannel , maysaslserver saslswitchchannel tcp_auth ON
    THE tcp_local ...which takes the non INTERNAL SMTP connections ...
    ! tcp_auth
    tcp_auth smtp mx single_sys mustsaslserver missingrecipientpolicy 4
    tcp_auth-daemon
    As there is no switch statement here ...defaults noswitchchannel applies
    SO THE DEFAULT imta.cnf supports smtp auth ....but it does not work here
    I just tried to replicate the symptoms you see but I am having the
    opposite effect.
    Out of the box both the backend Messaging Server and the MTA have the
    same keywords on the tcp_local channel and on the tcp_intranet
    channel.
    Here is a test I would suggest you try out.
    I forgot to mention that these tests changes should take place only on the MTA.
    >>
    - Pick a host that you are going to do the telnet tests from and place
    its IP address into the INTERNAL_IP mappings table. Place it as the
    very first entry in that table and specify a $N so as to ensure that
    this IP address is most definitely not considered internal.
    Your mapping table should now look like:
    INTERNAL_IP
    172.16.131.88 $N
    $(172.16.131.131/24) $Y
    127.0.0.1 $Y
    * $N
    where 172.16.131.88 is the IP address of the node you telnet from.
    In my testing, I get behaviour that is the opposite to what you
    report. The MTA will announce the AUTH capabilities and the Message
    Store will not do so.
    Please test as shown above and see if you are able to get this behaviour.
    Also the imta.cnf files are same (except the hostnames) in the backend
    messaging server and the frontend MTA ...backend supports SMTP
    AUTH...which I have already tested.
    Further, I have a similar setup in iMS5.2 ....there everything works as
    expected.....
    I think there is a BUG in the installation of SJES 2005Q4 ...when we
    choose single component MTA ....
    One problem which I already solved is that ...the latter installations
    (MMP, MTA, MEM etc) reset the MailHost ldap attribute value in the
    directory server.

  • Mailer object error message "SMTP: invalid from address. SMTP error 530 5.7.0 Must issue a STARTTLS command first. d5sm35857280yhl.19".

    I am trying to send an email from Lookout V6.6 using the Mailer object.  I have an email address setup through GMAIL and have verified it works.  Also, Lookout Mailer object is able to verify GMAIL server.  I get the following error message when trying to send the email: "SMTP: invalid from address. SMTP error 530 5.7.0 Must issue a STARTTLS command first. d5sm35857280yhl.19".  Anyone know what is causing this?

    Another method is to use a SMTP relayer, we have deployed them in the past.
    http://www.hmailserver.com/index.php?page=welcome
    Mike
    Forshock - Consult.Develop.Solve.

  • ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command fi

    Hello friend,
    I have changed my smtp server to send email but now i am getting a different error like given below
    ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command first. 2sm141783tif.39
    I dont know what is this STARTTLS command.
    Pls help me ;
    Thanks,
    Uttam SIngh

    It is NOT obvious to someone experiencing a ORA-29279: SMTP permanent error: messages that the root cause is in the SMPT server, it is still an ORA error code. It is especially NOT OBVIOUS, if that person is OBVIOUSLY a newbie. It is OBVIOUS that when you essentially flame people for asking such questions you discourage them from ever asking questions on your forum.
    Could you PLEASE, PLEASE, PLEASE be a little less arrogant and stop cluttering up this forum with over-the-top and OFF responses????
    Thank You in Advance Mr. Expert.

  • ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command

    Hi,
    When am sending mail through apex_mail it getting an error { " ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS  "}
    ACL Package
    {{{{  " DECLARE
    ACL_PATH VARCHAR2(4000);
    ACL_ID RAW(16);
    BEGIN
    -- Look for the ACL currently assigned to '*' and give APEX_040100
    -- the "connect" privilege if APEX_040000 does not have the privilege yet.
    SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
    WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    -- Before checking the privilege, make sure that the ACL is valid
    -- (for example, does not contain stale references to dropped users).
    -- If it does, the following exception will be raised:
    -- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040100'
    -- ORA-06512: at "XDB.DBMS_XDBZ", line ...
    SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
    FROM XDB.XDB$ACL A, PATH_VIEW P
    WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
    EQUALS_PATH(P.RES, ACL_PATH) = 1;
    DBMS_XDBZ.ValidateACL(ACL_ID);
    IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040100',
    'connect') IS NULL THEN
    DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
    'APEX_040100', TRUE, 'connect');
    END IF;
    EXCEPTION
    -- When no ACL has been assigned to '*'.
    WHEN NO_DATA_FOUND THEN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_040100', TRUE, 'connect');
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
    END;
    COMMIT;
    And i changed in the instance settings under email to smtp credentials.
    can anyone tel me about this error.??
    My apex version - 4.1.1
    database version - 11gr2
    Edited by: Tulasi 1243 on Aug 17, 2012 4:27 PM

    Hi,
    Many mail server provides like gmail use TLS/SSL for mail transmission. The error suggest your mail server is expecting a TLS/SSL connection.
    The TLS/SSL connection is not part of the UTL_SMTP and UTL_MAIL API. You have to either use Wallet as described here http://oracleblues.blogspot.in/2010/09/11g-release-2-11202-new-utlsmtp.html or use a third party tunneler like stunnel as described here http://monkeyonoracle.blogspot.in/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
    Cheers,

  • Problem recieving email Diagnostic-Code: smtp; 530 Must issue a STARTTLS co

    Hello all,
    I am running OSX Server 10.4.9 configured mail services. I'm able to recieve mail from Yahoo. However when logging onto Webmail from Cox or when trying to receive email from others some are getting this messgae:
    Diagnostic-Code: smtp; 530 Must issue a STARTTLS command first
    I am kind of new to this stuff and can't fuguire out what this means or how to fix it... Any help would be great.
    Second question does anybody now how to configure outlook windows users?

    Configure Pop, SMTP with SSL. I just want the mail server to be secure and don't want to end up with open relays for spammers...
    I don't have alternate ports enabled. I read the web page and 'm confused as to how to do it?How exactly do I do this? I'm reading:Alternate SMTP Ports
    To enable alternate SMTP submission ports, add one or both of the following to /etc/postfix/master.cf
    For organization, paste just below this line:
    smtp inet n - n - - smtpd
    # Code to enable two common alternate SMTP Submission ports
    # Modify the -o options to suit your requirements
    # Option lines should start with one or more spaces
    # Don't forget to open firewall ports for outside access
    # Enable SMTP-TLS on port 587 with specified options
    587 inet n - n - - smtpd
    -o smtpdclientrestrictions=
    -o smtpdrecipient_restrictions=permit_saslauthenticated,reject
    -o content_filter=
    -o smtpdenforcetls=yes
    # Enables SMTPS on port 465 with specified options.
    # This works well with Outlook 2003
    465 inet n - n - - smtpd
    -o smtpdtlswrappermode=yes
    -o smtpdclientrestrictions=
    -o smtpdrecipient_restrictions=permit_saslauthenticated,reject
    -o content_filter=
    After saving, from Terminal, issue:
    sudo postfix reload
    Note 1:
    You can achieve the same setup by uncommenting the appropriate lines in master.cf. This tip uses the port# to be clear.
    Note 2:
    You can assign most postfix main.cf options to each port using the format above. The example code disables the content filter for user submittted mail (not the best idea for all sites, but very effecient), smtpdclientsrestrictions are bypasses and smtpd_recipient restrictions are set to only allow authenticated users to submit.
    OK what do I paste and where?

  • JavaMail Gmail Error !! Strucked - "Must issue a STARTTLS command first"

    I have used the code as below. !!
    I guess code is perfect and i have tried many alternative code. but not working !!
    I am calling the function from my other Page
    Error
    oracle.apps.fnd.framework.OAException: java.lang.RuntimeException: javax.mail.SendFailedException: Sending failed;
    class javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. nh6sm15292366pbc.44
    <h5>
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class SendMail {
    public static void send(String to, String from, String subject,
    String body) {
    final String username = "emailId";
    final String password = "password";
    Properties props = new Properties();
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.starttls.enable", "true");
    props.put("mail.smtp.host", "smtp.gmail.com");
    props.put("mail.smtp.port", "587");
    Session session = Session.getInstance(props,
    new javax.mail.Authenticator() {
    protected PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(username, password);
    session.setDebug(true);
    try {
    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    message.setRecipients(Message.RecipientType.TO,
    InternetAddress.parse(to));
    message.setSubject(subject);
    message.setText(body);
    Transport.send(message);
    System.out.println("Done");
    catch (MessagingException e)
    throw new RuntimeException(e);
    public static void main(String[] args) {
    SendMail sendMail = new SendMail();
    sendMail.send("[email protected]", "[email protected]", "javamail", "Body");
    </h5>
    Edited by: 942767 on Jun 27, 2012 7:14 AM

    I am using Java Mail Version 1.3.1
    Debug Out Put
    12/06/28 05:29:20 DEBUG: setDebug: JavaMail version 1.3.1
    12/06/28 05:29:20 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    12/06/28 05:29:20 DEBUG SMTP: useEhlo true, useAuth false
    12/06/28 05:29:20 DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587
    220 mx.google.com ESMTP hf5sm1011580pbc.4
    12/06/28 05:29:20 DEBUG SMTP: connected to host "smtp.gmail.com", port: 587
    EHLO Evosys-PC
    250-mx.google.com at your service, [115.115.128.82]
    250-SIZE 35882577
    250-8BITMIME
    250-STARTTLS
    250 ENHANCEDSTATUSCODES
    12/06/28 05:29:20 DEBUG SMTP: Found extension "SIZE", arg "35882577"
    12/06/28 05:29:20 DEBUG SMTP: Found extension "8BITMIME", arg ""
    12/06/28 05:29:20 DEBUG SMTP: Found extension "STARTTLS", arg ""
    12/06/28 05:29:20 DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    12/06/28 05:29:20 DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    530 5.7.0 Must issue a STARTTLS command first. hf5sm1011580pbc.4
    Edited by: 942767 on Jun 27, 2012 10:54 PM

  • Exception in Sending Mails - Must issue a STARTTLS

    Sending Mails to Multiple Users
    I m getting this error, can somebody tell me what could be the possible error here:
    530 5.7.0 Must issue a STARTTLS command first k39sm4421196wah
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first k39sm4421196wah
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
    at MailSender.sendMessageTo(MailSender.java:46)
    at Mailer.sendMessages(Mailer.java:19)
    at Mailer.main(Mailer.java:33)
    Exception in thread "main" com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first k39sm44211
    96wah
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
    at MailSender.sendMessageTo(MailSender.java:46)
    at Mailer.sendMessages(Mailer.java:19)
    at Mailer.main(Mailer.java:33)

    Your server wants you to issue a STARTTLS command to switch the
    socket to a secure connection. You can allow JavaMail to do that by
    setting the "mail.smtp.starttls.enable" property to "true" when you create
    the Session. See the SSLNOTES.txt file included with JavaMail and the
    com.sun.mail.smtp package javadocs.

  • SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first

    Hello, I was trying to send mails via GMail's smtp server (smtp.gmail.com) but the following exception occurred. I used port 25 (used 467 also, didnt work). Would anybody tell what the following exception mean. Thanx.
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command firstHere's my code:
    import javax.mail.*;
    import javax.mail.event.TransportListener;
    import javax.mail.event.TransportEvent;
    import javax.mail.internet.*;
    import java.util.Properties;
    import javax.activation.*;
    class MailSender {
         private String mailHost="smtp.gmail.com";
         private String body;
         private String myFile="F:\\DRacing.avi";
         private Properties props;
         private Session mailSession;
         private MimeMessage message;
         private InternetAddress sender;
         private Multipart mailBody;
         private MimeBodyPart mainBody;
         private MimeBodyPart mimeAttach;
         private DataSource fds;
         MailSender()
              //Creating a Session
              props=new Properties();
                        props.put("mail.transport.protocol", "smtp");
              props.put("mail.smtp.host", mailHost);
              props.put("mail.smtp.port", "25");
              props.put("mail.smtp.auth", "true");
              mailSession=Session.getDefaultInstance(props, new MyAuthenticator());
              //Constructing and Sending a Message
              try
                   //Starting a new Message
                   message=new MimeMessage(mailSession);
                   mailBody=new MimeMultipart();
                   //Setting the Sender and Recipients
                   sender=new InternetAddress("[email protected]", "Kayes");
                   message.setFrom(sender);
                   InternetAddress[] toList={new InternetAddress("[email protected]")};
                   message.setRecipients(Message.RecipientType.TO, toList);
                   //Setting the Subject and Headers
                   message.setSubject("My first JavaMail program");
                   //Setting the Message body
                   body="Hello!";
                   mainBody=new MimeBodyPart();
                   mainBody.setDataHandler(new DataHandler(body, "text/plain"));
                   mailBody.addBodyPart(mainBody);
                   //Adding a single attachment
                   fds=new FileDataSource(myFile);
                   mimeAttach=new MimeBodyPart();
                   mimeAttach.setDataHandler(new DataHandler(fds));
                   mimeAttach.setFileName(fds.getName());
                   mailBody.addBodyPart(mimeAttach);
                   message.setContent(mailBody);
                                  Transport.send(message);
              catch(java.io.UnsupportedEncodingException e)
                   System.out.println(e);
              catch(MessagingException e)
                   System.out.println(e);
              catch(IllegalStateException e)
                   System.out.println(e);
    public class TestMail01
         public static void main(String args[])
              new MailSender();
    class MyAuthenticator extends Authenticator
         MyAuthenticator()
              super();
         protected PasswordAuthentication getPasswordAuthentication()
              return new PasswordAuthentication("dider7", "MY_PASSWORD");
    }

    This is an application that sends a message but there is a problem the domain could not be resolved
    * Notifier.java
    * Created on March 23, 2006, 11:22 AM
    * To change this template, choose Tools | Options and locate the template under
    * the Source Creation and Management node. Right-click the template and choose
    * Open. You can then make changes to the template in the Source Editor.
    * @author Trainee
    import java.util.*;
    import java.sql.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class Notifier //throws MessagingException
    public static void main(String args[]) //throws Exception
    //SystemTray.getDefaultSystemTray().addTrayIcon(new TrayIcon(new ImageIcon("imagefilename")));
    // starts time getter
    NotifierThread NThread = new NotifierThread();
    Thread t = new Thread(NThread);
    t.start();
    //email module
    //EmailThread emailThread = new EmailThread();
    //emailThread.sendMessage();
    /*SimpleSender simple = new SimpleSender();
    simple.senderClassKo();*/
    //String[] arrayKo = { "[email protected]","def","xyz" };
    //String[] arrayKo = { "[email protected]","def","xyz" };
    //String recipients = "[email protected]";
    /*EmailThread EThread = new EmailThread();
    try
    // ( String recipients[ ], String subject, String message , String from)
    EThread.postMail( "[email protected]" , "NOTIFY", "ContractOverdue" , "[email protected]");
    System.out.println("ethread");
    catch(MessagingException me)
    me.printStackTrace();
    //DBConnection dbc = new DBConnection();
    //dbc.DBConnect();
    String host = "smtp.gmail.com";
    String from = "[email protected]";
    //String to = "[email protected]";
    String to = "[email protected]";
    // Get system properties
    Properties props = System.getProperties();
    // Setup mail server
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.starttls.enable", "true");
    props.put("mail.smtp.auth", "true");
    // Get session
    Authenticator auth = new MyAuthenticator();
    Session session = Session.getDefaultInstance(props, auth);
    // Define message
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO,
    new InternetAddress(to));
    message.setSubject("Hello JavaMail");
    message.setText("Welcome to JavaMail");
    // Send message
    //com.sun.mail.smtp.SMTPSSLTransport.send(message);
    Transport.send(message);*/
    class DBConnection
    static String[] email2 = new String[10];
    static int ctr = 0;
    static String ctrlno = "";
    public void DBConnect()
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    try
    Class.forName("org.postgresql.Driver");
    connection = DriverManager.getConnection("jdbc:postgresql:cms", "postgres", "password");
    statement = connection.createStatement();
    String ctrlno2 = "ctrlno1";
    String sql = "SELECT (expiredate - CURRENT_DATE) as no_days, cms_trans_contract.ctrlno, cms_trans_contract_notify.notifyid, ofc_employee.email, notify1, notify2, notify3 from" +
    " cms_trans_contract, cms_trans_contract_notify, ofc_employee where" +
    " cms_trans_contract.ctrlno = cms_trans_contract_notify.ctrlno and cms_trans_contract_notify.notifyid = ofc_employee.idnum";
    //where ctrlno = " + "'"+ctrlno2+"'";
    //"select expiredate from cms_trans_contract";
    //wherer ctrlno = " + "'"+ctrlno2+"'";
    //SELECT (CURRENT_DATE - expiredate) as no_days from cms_trans_contract
    sql += "where startdate between '";
    sql += request.getParameter("commenceStartDate") + "' and '"
    sql += request.getParameter("commenceEndDate") + "'";
    sql += "and expiredate between '";
    sql += request.getParameter("expireStartDate") + "' and '"
    sql += request.getParameter("expireEndDate") + "'";
    rs = statement.executeQuery(sql);
    //System.out.println("rs: " + rs.next());
    while (rs.next())
    //System.out.println("Record Found");
    String firstname = "";
    String lastname = "";
    String notifyid = "";
    String email = "";
    int notify1;
    int notify2;
    int notify3;
    //Date expiredate;
    int subtracted_date;
    //firstname = (rs.getString(1));
    subtracted_date = (rs.getInt(1));
    ctrlno = (rs.getString(2));
    notifyid = (rs.getString(3));
    //email = (rs.getString(4));
    email2[ctr] = (rs.getString(4));
    notify1 = (rs.getInt(5));
    notify2 = (rs.getInt(6));
    notify3 = (rs.getInt(7));
    //lastname = (rs.getString(2));
    //out.println(contract.getCtrlno());
    //System.out.println("FIRSTNAME: " + firstname);
    //System.out.println("LASTNAME: " + lastname);
    //System.out.println("Expiredate: " + expiredate);
    //System.out.println("Ctrlno: " + ctrlno);
    System.out.println("SUB: " + subtracted_date);
    //System.out.println("sql: " + sql);
    if((((subtracted_date == notify1) || (subtracted_date == notify2)) || (subtracted_date == notify3)) && (subtracted_date > 0))
    System.out.println("CtrlnoGET: " + ctrlno);
    System.out.println("NotifyID: " + notifyid);
    //System.out.println("email " + email);
    System.out.println("EmailCTR: " + ctr +": " + email2[ctr]);
    System.out.println("notify1: " + notify1);
    System.out.println("notify2: " + notify2);
    System.out.println("notify3: " + notify3);
    EmailThread emailThread = new EmailThread();
    emailThread.sendMessage(DBConnection.email2, DBConnection.ctrlno);
    //ctr++;
    ctr++;
    if (rs.next() == false)
    System.out.println("No records found");
    catch (Exception ex)
    ex.printStackTrace();
    System.out.println("Error getting connections");
    finally
    try
    if (rs != null)
    rs.close();
    if (statement != null)
    statement.close();
    if (connection != null)
    connection.close();
    catch (Exception ex)
    ex.printStackTrace();
    System.out.println("Error closing connections");
    // time getter module
    class NotifierThread implements Runnable
    public void run()
    while (true)
    Calendar cal = new GregorianCalendar();
    int hour12 = cal.get(Calendar.HOUR); // Range 0..11
    //int hour24 = cal.get(Calendar.HOUR_OF_DAY); // Range 0..23
    int min = cal.get(Calendar.MINUTE); // Range 0..59
    int sec = cal.get(Calendar.SECOND); // Range 0..59
    //int ms = cal.get(Calendar.MILLISECOND); // Range 0..999
    int ampm = cal.get(Calendar.AM_PM); // Range 0=AM, 1=PM
    String am_pm = "";
    if(ampm == 0)
    am_pm = "AM";
    else
    am_pm = "PM";
    System.out.println("Time " + hour12 + ":" + min + ":" + sec + " " + am_pm);
    if(sec == 10)
    System.out.println("YIPEE");
    //EmailThread emailThread = new EmailThread();
    //emailThread.sendMessage(DBConnection.email2);
    DBConnection dbc = new DBConnection();
    dbc.DBConnect();
    try
    Thread.sleep(1000);
    catch(Exception e)
    e.printStackTrace();
    class SimpleSender
    * Main method to send a message given on the command line.
    /*public void senderClassKo()
    try
    //String smtpServer="mail.kiksbalayon.com";
    String smtpServer="localhost";
    String to="[email protected]";
    String from="[email protected]";
    String subject="hello";
    String body="sa wakas ng send din";
    send(smtpServer, to, from, subject, body);
    catch (Exception ex)
    //System.out.println("Usage: java com.lotontech.mail.SimpleSender"
    //+" smtpServer toAddress fromAddress subjectText bodyText");
    System.exit(0);
    /*public static void send(String smtpServer, String to, String from, String subject, String body)
    try
    Properties props = System.getProperties();
    // -- Attaching to default Session, or we could start a new one --
    props.put("mail.smtp.host", smtpServer);
    Session session = Session.getDefaultInstance(props, null);
    // -- Create a new message --
    Message msg = new MimeMessage(session);
    // -- Set the FROM and TO fields --
    msg.setFrom(new InternetAddress(from));
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
    // -- We could include CC recipients too --
    // if (cc != null)
    // msg.setRecipients(Message.RecipientType.CC
    // ,InternetAddress.parse(cc, false));
    // -- Set the subject and body text --
    msg.setSubject(subject);
    msg.setText(body);
    // -- Set some other header information --
    //msg.setHeader("X-Mailer", "LOTONtechEmail");
    msg.setSentDate(new Date());
    // -- Send the message --
    Transport.send(msg);
    System.out.println("Message sent OK.");
    catch (Exception ex)
    ex.printStackTrace();
    //Authentication module
    class MyAuthenticator extends Authenticator
    MyAuthenticator()
    super();
    //protected PasswordAuthentication getPasswordAuthentication()
    public PasswordAuthentication getPasswordAuthentication()
    return new PasswordAuthentication("johann108", "password");
    // email module
    class EmailThread //throws MessagingException
    public void sendMessage(String toEmail[], String ctrlno) //throws MessagingException
    try
    String host = "localhost";
    //String host = "mail.philweb.com";
    //String from = "[email protected]";
    String from = "[email protected]";
    //String[] to = toEmail;
    //"[email protected]";
    // Get system properties
    Properties props = System.getProperties();
    // Setup mail server
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.auth", "true");
    // Get session
    Authenticator auth = new MyAuthenticator();
    Session session = Session.getDefaultInstance(props, auth);
    boolean debug = true;
    session.setDebug(debug);
    // Define message
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    InternetAddress[] to = new InternetAddress[DBConnection.ctr];
    for (int i = 0; i < DBConnection.ctr; i++)
    to[i] = new InternetAddress(toEmail);
    //System.out.println("EMAILTO:" + to[i]);
    message.setRecipients(Message.RecipientType.TO, to);
    //message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    message.setSubject("Contract Expiry");
    message.setText(
    "Contract is about to expire\n" +
    " ContractNumber is " + DBConnection.ctrlno
    // Send message
    Transport.send(message);
    catch(Exception me)
    me.printStackTrace();
    System.out.println("Error in Sending Message");

  • 829 = 530 5 7 0 Must issue a STARTTLS command first. d4s

    Hi SAP Guru's
    I have configured SCOT for SMTP but when I am sending mails its show in below error
    Internal error: CL_SMTP_RESPONSE ESMTP error code is not
    known. 530 530 5.7.0 Must issue a STARTTLS command first.d4s
    and scot trace is giving below error
    829 = 530 5 7 0 Must issue a STARTTLS command first. d4s
    I have gone thorugh all the SDN Threads but no success , please suggest some solution

    hi
    check this SAP Notes
    931596 Recipient is missing in synchronous status message 04.05.2006
    751332 Error sending mails with several recipients 08.04.2005
    690020 SAPconnect send process hangs with large mails 27.01.2004
      693215 Service unavailable during inbound processing 30.12.2003
    402907 SAPconnect: Sending via ESMTP terminates with a dump

  • Must issue a STARTTLS command first

    Hi, I hope anyone can help me.
    I'm trying to setup BPM Studio to send emails.
    I've been reviewing some previous threads but I couldn't find a solution.
    I want to use gmail or hotmail smtp but I get the following error:
    530 5.7.0 Must issue a STARTTLS command first.
    I've created an external resource to setup the SMTP.
    I will appreciate any help.
    Thanks,
    Matias

    Hi Matias,
    I poked arount this today and could not get gmail's StartTLS working in Oracle BPM either. Just as an experiment, I verified that I could send an email using another client (Eudora) using my Gmail account. Using the smtp server "smtp.gmail.com" and port 587 and marking it "StartTLS". This worked like a charm.
    Unfortunately, as you've seen - when configuring an Outgoing Email Service (right mouse click "External Resources" -> "New External Resource" -> click the "Type" dropdown and click "Mail Outgoing Service") none of the 4 options are "STARTTLS". I thought either "SSL" or "TLS" would have worked but they don't.
    Other than hand coding Java, I'm not sure there's a good answer for you since it appears StartTLS is not supported in Oracle BPM.
    Is it possible you might be able to use another SMTP outgoing service? Most companies I've worked with in the past have made their SMTP service available that does not require StartTLS.
    Sorry,
    Dan

  • SMTP relay authentication issue with DynDNS MailHop Outbound

    Hi,
    I'm trying to use the SMTP relay functionality of my OS X Server but I get following log message:
    Apr 4 21:40:21 mydomain postfix/smtp[7629]: 4EE3686F529: to=<xxxx@xxxxx>, relay=outbound.mailhop.org[204.13.248.71]:465, delay=140731, delays=140130/0.06/600/0, dsn=4.4.2, status=deferred (conversation with outbound.mailhop.org[204.13.248.71] timed out while receiving the initial server greeting)
    I configured the relay settings in Server-Admin for host: outbound.mailhop.org:465 and added my dyndns username and password.
    I would appreciate if someone could help me to figure out what I'm missing.
    Thanks

    If you're getting a 550 error then it indicates an issue with the SMTP server you're using / how you're connecting to it. Either the mail server you've got configured for SMTP isn't setup to handle email for you, or in addition to setting the server address
    in the SMTP settings, you also need to configure it to configure authentication on the email accounts. In the account settings you need to select More settings (I think, I don't have an Outlook 2007 copy to check on), then you'll see an Outgoing
    Server tab, within which you can configure the required authentication. It will either be the same as the POP3 login, in which case you can select "Use same settings as my incoming mail server", or if they're different you can enter the specific details that
    are required to send.

Maybe you are looking for

  • Adobe master collection cs3 error message

    hi, when i try to convert a document using adobe acrobat 8 professional i get the follwoing message - adobe pdf printer failed to create the PDF file - does anyone have and ideas that might help solve this problem? thanks paul.

  • Flash doesn't work after I updated it

    I am using Firefox 34.0.5 and updated my flash player but after the update it stopped working. The videos doesn't show up. I tried disabling all add-ons and found out that Shockwave Flash 16.0 is causing the problem. What should I do to make it work

  • Restrictions of movement types in MIGO

    Hello, When I select goods receipt in MIGO, I would like the system to avoid using 201 movement type. I mean, if I select goods receipt, it should only work for goods receipt Is there a way that I can block other movement types like this? I tried to

  • PREPARE Stuck in IMPORT Phase

    We are Upgrading SRM Development Server . ( Oracle 10G on HPUX) My PREPARE Phase is Running IMPORT Module  NPREPCRE0 Subphase . This Phase is running from more than 24 hr . As per document ( Upgrade Guide  I cannot Stop PREPARE in these phase .)   Pl

  • Regarding Weekend Dates and Holiday Dates - answer please

    Hi have Sales order date and amount sold columns in my report. The user requirement is they want to see all the sales that are done during the weekend and Holidays but the report should only show the sales order date and the amount (the weekend and h