Smtp auth required

Hi
As of today I am getting an alert for thunderbird saying. The mail server responded: SMTP Auth required for message submission on port 587.
Can anyone tell me how I fix this. My tech guys say there should be a tick box in thunderbird saying the server requires SMTP Authorisation but I can't find it anywhere.

''christ1 [[#answer-700312|said]]''
<blockquote>
Tools (Alt-T) - Account Settings
Select 'Outgoing Server (SMTP)' in the left pane, it's at the bottom of the pane.
Select your SMTP server - Edit
Enter your user ID.
Thunderbird will prompt you for a password the next time you attempt to send a message.
</blockquote>
Hi Chris
We have tried changing the password but this does not solve the problem.
I am looking for a tick box that say SMTP requires authorisation.
Thanks

Similar Messages

  • AuthenticationFailedException when using JNDI and JavaMail with SMTP auth

    Hi all - I've been banging my head on this one for awhile now - hopefully someone else has done this.
    We are working in a servlet container (tomcat), and need obtain a mail session from JNDI. We do this as follows:
                   Context initCtx = new InitialContext();
                   Context envCtx = (Context) initCtx.lookup("java:comp/env");
                   Session mailSession=(Session) envCtx.lookup("mailSession/trumpetinc");so far so good. The jndi entry for the mail session is configured in server.xml as follows:
              <Resource name="mailSession/trumpetinc" scope="Shareable" type="javax.mail.Session"/>
              <ResourceParams name="mailSession/trumpetinc">
                <parameter>
                  <name>mail.smtp.host</name>
                  <value>mail.server.com</value>
                </parameter>
                <parameter>
                  <name>mail.smtp.password</name>
                  <value>ABCDEFG</value>
                </parameter>
                <parameter>
                  <name>mail.smtp.user</name>
                  <value>trumpet_kevin</value>
                </parameter>
             <parameter>
               <name>mail.smtp.auth</name>
               <value>true</value>
             </parameter>
              </ResourceParams>With the above, whenever we hit Transport.send(msg), we got an AuthenticationFailedException thrown. I have run into this before with SMTP authentication, so I decided to try using the transport.sendMessage() method instead.
    So, I get the transport:
    Transport trans = mailSession.getTransport("smtp");
    trans.connect();Then I send my message using:
    msg.saveChanges();
    trans.sendMessage(msg, msg.getAllRecipients());and finally, I close the transport:
    trans.close();Unfortunately, I'm still getting the exception. Is it possible that my connect() method is not picking up the JNDI properties set in the server.xml file (this seems likely)? If so, what's the best way for me to get those properties so I can set them explicitly in the connect() method?
    Thanks in advance,
    - Kevin

    Hi,
    I have faced the same problem and after some googling and trying I have discovered what causes the AuthenticationFailedException exception. I just wanted to share the knowedge maybe it will be helpfull to others.
    Here it is what the API says:
    To use SMTP authentication you'll need to set the mail.smtp.auth property (see below) and provide the SMTP Transport with a username and password when connecting to the SMTP server. You can do this using one of the following approaches:
    1.Provide an Authenticator object when creating your mail Session and provide the username and password information during the Authenticator callback.
    Note that the mail.smtp.user property can be set to provide a default username for the callback, but the password will still need to be supplied explicitly.
    This approach allows you to use the static Transport send method to send messages.
    2.Call the Transport connect method explicitly with username and password arguments.
    This approach requires you to explicitly manage a Transport object and use the Transport sendMessage method to send the message. The transport.java demo program demonstrates how to manage a Transport object. The following is roughly equivalent to the static Transport send method, but supplies the needed username and password:
    Using the Transport.connect makes the JNDI not very helpfull for configuration.
    It seems that using just the mail.smtp.user and mail.smtp.pass is not sufficient for the authentication.
    so, the solution is :
    just place these to lines in the JNDI configuration:
              username="test"
              password="test1"
    so it should looks as follows:
              <Resource name="mail/Session" auth="Container"
              type="javax.mail.Session"
              username="test"
              password="test1"
              mail.transport.protocol="smtp"
              mail.smtp.auth="true"     
              mail.smtp.host="localhost"
              mail.smtp.port="25"
              mail.smtp.user="test"
              mail.smtp.password="test1"
    />
    where test and test1 are the user's credentials
    Regards,
    Kiril
    Message was edited by:
    Kireto
    Message was edited by:
    Kireto

  • OS X's Mail app and SMTP auth

    We're having a problem with OS X's Mail app connecting to Tiger Server's mail server. We have the server set up to not always require SMTP auth (all SMTP auth settings unchecked in Settings > Advanced > Security), and to allow relay from only a given set of networks (Settings > Relay). In theory, this means that if you're on one of the specified networks, you're not required to authenticate, otherwise you are. This according to Apple's documentation.
    From a bit of packet sniffing, it looks like:
    1. If a user on an allowed network tries to send mail through the server, the server does not return authorization as an option.
    2. If the user has password authentication specified in Mail's SMTP Server settings, it refuses to send. If they set SMTP auth to None, the Mail app will send.
    IOW, Mail doesn't send if Authorization is enabled in the Mail app, but not given as an option by the mail server. Has anyone else seen this? Is this a bug in Mail or Postfix?

    If you have networks entered in
    'Accept SMTP relay only from these hosts and
    networks'
    Clients on these networks don't need to authenticate
    for local delivery or relay.
    So it does what you are looking for.
    Jeff
    Well, goddarn it - so it does!
    I was testing various permutation (10.3.4) just recently and it just wouldn't relay without auth if any of them was selected (honest!). That was with the trusted relay....
    ...but I just tried it again and it's fine!
    I had put it down to just another 'glitch' in the documentation.
    Oh well - glad you were there to point it out Jeff!
    Whilst we are on the subject - do you know of any way to tie authentication (outwith trusted network) to specified users? I was thinking there might be a Postfix parameter for this (sorry, I should just look them all up but maybe someone knows it already)?
    Thank, and sorry for any earlier confusion!
    -david.

  • Pop before smtp and smtp auth

    Hi Jay,
    hope all is well with you.
    what is pop before smtp and how to see if it is enabled?
    what is smtp auth and how to see if it is enabled? Is it enabled by default on MS 6.x?
    what happens if smtp auth is not enabled? Will my mail server be a relay?
    Is there any additional configuration that should be done on messaging server to allow connection for dial-up users?
    thanks,

    Hi Jay,
    hope all is well with you.
    what is pop before smtp and how to see if it is
    enabled?Pop before SMTP is a very old, and little used method for "authenticating" users. There is virtually no reason to turn this on, anymore.
    It's done through the MMP, and is the only reason to actually use the SMTP proxy that's part of MMP.
    I would not go there unless your environment requires it. Most do not. Most clients support SMTP authentication, which is much better, and is on by default.
    >
    what is smtp auth and how to see if it is enabled? Is
    it enabled by default on MS 6.x?See above. Yes, smtp authentication is on by default.
    >
    what happens if smtp auth is not enabled? Will my
    mail server be a relay?Totally different issue.
    No.
    If smtp auth is off, if you have external users, they likely will not be allowed to send to other external users..
    >
    Is there any additional configuration that should be
    done on messaging server to allow connection for
    dial-up users?If "dial-up users" means that they come from ip addresses outside your network, then smtp auth will allow them full access.
    thanks,

  • Server to server smtp auth

    Hello,
    I have a Messaging 6.x (JES 2005Q4 version) installation. All outbound email must go
    through an external MTA so I added a smartrelay (daemon in tcp_local channel) and all works ok but the external MTA requires authentication so the question is:
    how can I configure to send SMTP AUTH to the smartrelay?
    I get the following when sending mail:
    27-Jan-2006 18:42:00.44 tcp_local R 1 [email protected] rfc822;[email protected] [email protected] dns;outbound.relay.com (outbound.relay.com ESMTP Exim 4.51 Fri, 27 Jan 2006 19:41:57 -0500) smtp;550 You must authenticate to use this relay
    I have set this up in a postfix installation and all works ok.
    Thanks all in advance.

    Hello,
    I have a Messaging 6.x (JES 2005Q4 version)
    installation. All outbound email must go
    through an external MTA so I added a smartrelay
    (daemon in tcp_local channel) and all works ok but
    the external MTA requires authentication so the
    question is:
    how can I configure to send SMTP AUTH to the
    smartrelay?Far as I know, you can't.
    >
    I get the following when sending mail:
    27-Jan-2006 18:42:00.44 tcp_local R 1
    [email protected] rfc822;[email protected]
    [email protected] dns;outbound.relay.com
    (outbound.relay.com ESMTP Exim 4.51 Fri, 27 Jan 2006
    19:41:57 -0500) smtp;550 You must authenticate to use
    this relay
    I have set this up in a postfix installation and all
    works ok.
    Thanks all in advance.

  • DIsable smtp auth only for an ip

    Dear gurus,
    I have sun messaging server 6 running perfectly alright and only new thing which I would like to incorporate is to disable smtp auth only for one ip address.I am new to this system and have gathered following information from sun messaging docs, the steps which I followed..
    1) Create a table DISABLE_SMTPAUTH_IP similar to INTERNAL_IP mapping table in mapping file
    INTERNAL_IP
    10.18.18.19 $Y
    10.18.18.38 $Y
    10.18.18.30 $Y
    127.0.0.1 $Y
    * $N
    ! Added on 01092008 for disabling smtp_auth
    DISABLE_SMTPAUTH_IP
    external.ip.addres $Y
    *$N
    2) ALLOW PORT ACCESS
    *PORT_ACCESS
    *|*|*|*|* $C$|DISABLE_SMTPAUTH_IP;$3|$Y$E
    *|*|*|*|* $C$|INTERNAL_IP;$3|$Y$E
    3) Then right after the current rewrite rule in imta.cnf file Created new TCP CHANNEL
    ! Do mapping lookup for internal IP addresses
    [] $E$R${INTERNAL_IP,$L}$U%[$L]@tcp_intranet-daemon
    added a new rewrite rule:
    ! Do mapping lookup for "no smtp auth", non-internal IP addresses
    [] $E$R${DISABLE_SMTPAUTH_IP,$L}$U%[$L]@tcp_nosmtpauth-daemon
    ! ttcp_nosmtpauth-daemon
    tcp_nosmtpauth-daemon smtp mx single_sys subdirs 20 maxjobs 7 pool SMTP_POOL nosasl nosaslserver
    tcp_nosmtpauth-daemon
    ! tcp_local
    tcp_local smtp mx single_sys remotehost inner switchchannel subdirs 20 maxjobs 30 pool SMTP_POOL maytlsserver maysaslserver s
    aslswitchchannel tcp_auth loopcheck threaddepth 32 blocklimit 5120 notices 1 2 backoff "pt5m" "pt1h" "pt2h" "pt4h" destinati
    onspamfilter1optin spam
    tcp-daemon mumbbmr1.dataone.in
    ! tcp_intranet
    !tcp_intranet smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserver allowswitchchannel sasl
    switchchannel tcp_auth blocklimit 2500
    !tcp_intranet smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserver allowswitchchannel sasl
    switchchannel
    !tcp_intranet-daemon
    run /opt/SUNWmsgr/sbin/imsimta refresh
    alternatively tried imsimta cnbuild and imsimta restart
    but still i get Mail rely denied when I try sending messages from the same trusted IP without doing AUTH.
    I would like to know...
    1) If there is something mising or wrong in above steps
    2) HOw do i check if the messages from that IP(for which smtp auth is disabled) is passing from the tcp_nosmtpauth channel...
    THanks for giving your valuable time...

    thanks very much shane for giving time...
    Please always provide the exact version of Messaging Server (./imsimta version).
    mumxxxx1 # ./imsimta version
    Sun Java(tm) System Messaging Server 6.2-6.01 (built Apr 3 2006)
    libimta.so 6.2-6.01 (built 11:20:35, Apr 3 2006)
    SunOS mumxxxx1-a-fixed 5.9 Generic_118558-28 sun4u sparc SUNW,Sun-Fire-V440
    mumxxxx1#
    Why would you want to disable SMTP Authentication? What are you attempting to achieve by doing this -- what is the problem you are trying to solve?
    We are an ISP and therefore sometimes required to send bulk mail, for which we are currently using perl bulk mail module script and there we specify the users in text file to send message, everytime this module try sending it get Mail Relaying denied as it doesnot supply user and passwd required for smtp auth in base64.
    Therefore I wanted to disable smtp auth for an ip address using which smtp auth is not reqauired and mails should be openly relayed.
    Why are all of the above entries commented out? Did you intend to disable (break) the tcp_intranet channel?
    no it is not commented in config files.
    +./imsimta refresh is no longer a valid comment, you need to use ./imsimta cnbuild;./imsimta restart+
    as per sun mesaging server 6 admin guide it is given to be working. Alterntively I tried ./imsimta cnbuild;./imsimta restart.
    Please provide the mail.log_current line that matches the attempted email delivery which was rejected.
    mumxxxx /opt/SUNWmsgsr/sbin # tail -f /mta/logs/imta/mail.log_current
    08-Sep-2008 13:42:19.52 7079.0fca.710096 tcp_local J 0 [email protected] rfc822; [email protected] mailserv 530 5.7.1 Relaying not allowed: [email protected] SMTP
    bash-3.00# telnet mumxxxx 25 Trying 10.18.18.19...
    Connected to ::ffff:10.18.18.19.
    Escape character is '^]'.
    220 mumxxxx.datxxxx.in -- Server ESMTP (*)
    ehlo mumxxxx.daxxxx.in
    250-mumxxxx.daxxxxx.in
    250-8BITMIME
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-HELP
    250-XLOOP 82F58AB6E3453199924062C516F2E337
    250-AUTH PLAIN LOGIN
    250-AUTH=LOGIN
    250-ETRN
    250-NO-SOLICITING
    250 SIZE 0
    mail from: [email protected]
    250 2.5.0 Address Ok.
    rcpt to: [email protected]
    530 5.7.1 Relaying not allowed: [email protected]
    rcpt to: [email protected]
    Also please clarify if you want to disable the ability to perform SMTP auth or whether you want to allow email to be sent without requiring SMTP auth -- these are two completely different objectives.
    No I do not want to disable SMTP auth for everyone.DEfault is it should be forced to all except from one ip. ie disable smtp auth only for an ip address.
    Regards
    Pradeep

  • SMTP Password required

    My SMTP Server requires us to user a username/password. I noticed in the HTML DB Admin settings their is only options for server and port. How do I register a username/password?

    You can use UTL_SMTP to send mail through a server that requires authentication by sending the authentication commands after connecting. I use a procedure like the one below. I submit it using DBMS_JOB.
    CREATE OR REPLACE PROCEDURE "SEND_MAIL" (
    p_sender IN VARCHAR2,
    p_recipient IN VARCHAR2,
    p_message IN VARCHAR2
    AS
    l_mailhost VARCHAR2 (255) := 'your.outgoing.mailserver.address';
    l_mail_conn UTL_SMTP.connection;
    BEGIN
    l_mail_conn := UTL_SMTP.open_connection (l_mailhost, 25);
    utl_smtp.command( l_mail_conn, 'AUTH LOGIN');
    utl_smtp.command( l_mail_conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( 'Your Mail UserName' ))) );
    utl_smtp.command( l_mail_conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( 'Your Mail Password' ))) );
    UTL_SMTP.helo (l_mail_conn, l_mailhost);
    UTL_SMTP.mail (l_mail_conn, p_sender);
    UTL_SMTP.rcpt (l_mail_conn, p_recipient);
    UTL_SMTP.open_data (l_mail_conn);
    utl_smtp.write_data(l_mail_conn, 'Subject: Your Subject Line Here');
    UTL_SMTP.write_data (l_mail_conn, p_message);
    UTL_SMTP.close_data (l_mail_conn);
    UTL_SMTP.quit (l_mail_conn);
    END;

  • JavaMail: How to tell if SMTP server requires authentication

    I am writing an application that sends notification emails. I have a configuration screen for the user to specify the SMTP hostname and optionally a username and password, and I want to validate the settings. Here is the code I am using to do this:
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    if (mailUsername != null || mailPassword != null)
        props.put("mail.smtp.auth", "true");
    Session session = Session.getInstance(props, null);
    transport = session.getTransport();
    transport.connect(mailHostname, mailUsername, mailPassword);
    transport.close();This works if the user enters a username and password (whether they are valid or not), or if the username and password are empty but the SMTP server does not require authentication. However, if the server requires authentication and the username and password are empty, the call to transport.connect() succeeds, but the user will get an error later on when the app tries to actually send an email. I want to query the SMTP server to find out if authentication is required (not just supported), and inform the user when they are configuring the email settings. Is there any way to do this? I suppose I could try sending a test email to a dummy address, but I was hoping there would be a cleaner way.

    Thanks for your help. This is what I ended up doing, and it seems to work. For anyone else interested, after the code above (before transport.close(), I try to send an empty email, which causes JavaMail to throw an IOException, which I ignore. If some other MessagingException occurs, then there is some other problem (authentication required, invalid from address, etc).
    try
       // ...code from above...
       // Try sending an empty  message, which should fail with an
       // IOException if all other settings are correct.
       MimeMessage msg = new MimeMessage(session);
       if (mailFromAddress != null)
           msg.setFrom(new InternetAddress(mailFromAddress));
       msg.saveChanges();
       transport.sendMessage(msg,
           new InternetAddress[] {new InternetAddress("[email protected]")});
    catch (MessagingException e)
        // IOException is expected, anything else (including subclasses
        // of IOException like UnknownHostException) is an error.
        if (!e.getNextException().getClass().equals(IOException.class))
            // Handle other exceptions
    }Edited by: svattom on Jan 7, 2009 7:37 PM
    Edited by: svattom on Jan 7, 2009 10:01 PM
    Changed handling of subclasses of IOException like UnknownHostException

  • SMTP Auth & Maildir

    I have two seperate questions...
    I found this quote here:
    http://docs.info.apple.com/article.html?artnum=106763
    "Whenever Authenticated SMTP is enabled, your email server is effectively a "send only" server, because mail servers from other domains are most likely not configured to authenticate with your server. This means your local email clients can only receive email from other local clients. Authenticated SMTP also requires each user's email client software to authenticate before it sends mail through your server."
    I know this documentation is very old (10.1.3), but I need to know if this still true in Server 10.4.7? I have a LOT of traveling sales people that need to use either mail.app or outlook, and they are not going to be happy if I tell them they have to use webmail. I was planning on switching to OS X Server, but I need to know about this first.
    My second question is, what format does 10.4.7 server store its mail in? mbox? mdir? I have found conflicting answers online..
    Thanks,
    Brian
    Macbook   Mac OS X (10.4.7)  

    Actually, that excerpt does not make sense to me either.
    When Authenticated SMTP is enabled, only clients with the correct username and password may relay mail through your server. Any other client or server will not be able to relay mail through your server. The only mail your server will accept without authentication is those that are meant for the local accounts on the server. SMTP-AUTH just prevents unauthorized relays but not delivery.
    So your travelling reps should be able to use Mail.app to connect to your server and send mail to outside clients through your server. AND their clients should be able to send mail to your reps.

  • Mail 2.0 + SMTP auth + qmail

    On our SMTP servers (running qmail), we're currently not requiring SMTP auth, but it does work with other clients...just not with Apple Mail.
    If you connect to our SMTP server from another provider's network, there's a notification which tells the client that SMTP auth is required, so it works from another network.
    On our own network, however, SMTP auth is not required, so Mail never receives the notification of SMTP auth being possible, so it just times out when trying to authenticate.
    This is all on port 25, no SSL/TLS/etc., and all UNs/PWs are in cleartext.
    We're going to be requiring SMTP auth in the near future, so I need to figure this out for our Mac users (and myself).
    My feeling is that once we require SMTP auth, that notification will go to the client, and it will work, but I'm not sure, and I'm unable to get our admins to give me a test server to play with/test things out.
    Any ideas/thoughts?
    Thanks in advance...

    Hello,
    Mail, in all versions, has always timed out whenever a separate, "hard" authentication is not required, but attempted anyway. The difference has always appeared to me to relate to the fact that Mail will perform SMTP after POP3 authentication, WITHOUT having any authentication specified in the outgoing server settings. When the separate authentication is required, it should work fine.
    The difference may be that other mail clients stop their authentication actions when connection is successful, without it, but Mail proceeds to do what it is told to do -- if Password authentication is selected, ask no questions, just do it.
    In the Mail Setup Assistant now used in Mail 2.0, it is possible to select that the Outgoing Server requires authentication, but then NOT fill in the Password and Username if not needed. As far as I can tell, this does not seem different from specifying None in previous versions.
    Ernie

  • Mail and SMTP auth (RFC 1918 error) ?

    I've an iMac and a Macbook (both with Mac OS X 10.5.3). Both connected to Internet using Airport via my WiFi router (with NAT activated on this router). This behavior is working fine since almost 2 years.
    I was using (and I'm still using) Thunderbird (last version) to read and send my emails on the iMac, and Mac OS X Mail on the Macbook.
    Everything was fine until yesterday. My provider has change is SMTP server so that authentification is now required when sending message.
    So I've activated SMTP auth in Thunderbird and all is fine. And do the same under Mail (with password option). But it doesn't work with Mail, I've got a SMTP connexion error.
    When I choose the diagnostic button, I find that SMTP connexion (EHLO) is fine, then saying my IP address (192.168.x.x) is private according to RFC 1918 and ending the connexion (QUIT).
    I have the same error on my iMac, though it just work fine with Thunderbird.
    So it seems to me Mail can't connect because of this behavior. But I don't understand why my IP address in Mail dialog with my provider SMTP server is not NATed by my router, like all other IP traffic.
    And I don't know what to do to correct this problem.

    Well, as SMTP authentification is only required to forward mail to another domain, I try to send an mail to my wife who is on the same domain as myself. It work fine with authentification disabled using Thunderbird but don't work with Mail.
    As it use to work fine until I change the configuration, I try to delete my account informations and create a new one as it was 2 days ago (without SMTP auth) but it still doesn't work even if I've got no problem with Thunderbird.
    Anyone as an idea about all this mess ? My only clue is the Mail connection diag which show connect, helo (with my private IP), server response 550 RFC 1918 and quit. Even if I found this behavior very strange, the result of the diag is the same with or without SMTP auth actived. So I suppose it was already the same before when it was working fine...

  • Trouble sending SMTP AUTH

    I am having difficulty sending mail to an smtp server that requires authentication.
    The mail messages are valid so I snipped only the connection code:
            boolean DEBUG = true;
            Properties p = new Properties();
            p.put("mail.smtp.host", "mail._myhost.com");
            javax.mail.Session s = javax.mail.Session.getDefaultInstance(p, null);
            s.setPasswordAuthentication(
                    new URLName("mail._myhost.com"),
                    new PasswordAuthentication("_myuser","_mypass")
            s.setDebug(DEBUG);
    myhost, myuser, and _mypass are all valid.
    The smtp server is James 2.1.2 from apache/jakarta and this option works without authentication on a test mail server. There is no option is changing authentication on the intended server (obviously).
    The exception I get is:
    javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is:
    javax.mail.SendFailedException: 530 Authentication Required
    I would appreciate any help anyone may give me in correcting my code or pointing to where I may start looking for an answer.
    Thank you in advance for your help if you have any experience that may aid me in finding a solution.
    MB

    Bump.
    I can confirm AUTH working with perl libraries.
    Is javamail as buggy as some are claiming? I have not had problems up to this point and I am stumped with smtp AUTH.
    Thanks for your help.

  • Missing Property "mail.smtp.auth" in JavaMail Spec Appendix A

    Hi folks,
    I tried to connect to my Mail Server via JavaMail over SMTP in oder to send an Email. The Mail Server needs Authentication. I always got the warning: 530 Authorization required, even though I had set my username and Passwort in my javax.mail.Transport object. I took a look into the Spec and there was no property like "mail.smtp.auth". In the FAQ I found it, recently.
    I don't know if this should be reported as a bug. Perhaps somoene who is involved in the documentation writing reads this and changes this little fault.
    Thanks,
    Greets Juan.

    Hi Juan,
    take a look at the API doc -> package com.sun.mail.smtp.. here ou can find the properties.
    Appendix A is old.
    greetings,
    Filo

  • The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.

     try
                    MailMessage mail = new MailMessage();
                    SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
                    mail.From = new MailAddress("[email protected]");
                    mail.To.Add("[email protected]");
                    mail.Subject = "Test Mail..!!!!";
                    mail.Body = "mail with attachment";
                    System.Net.Mail.Attachment attachment;
                    attachment = new System.Net.Mail.Attachment(@"C:\Attachment.txt");
                    mail.Attachments.Add(attachment);
                    SmtpServer.Port = 587;
                    SmtpServer.UseDefaultCredentials = true;
                    SmtpServer.Credentials = new System.Net.NetworkCredential("userid", "Password");
                    SmtpServer.EnableSsl = true;
                    SmtpServer.Send(mail);
    Catch(Exception exception)
    When i m run this part of code it throw an Ecxeption                                                          
            Given Below is the Error.. 
        The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
    Bikky Kumar

     try
                    MailMessage mail = new MailMessage();
                    SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
                    mail.From = new MailAddress("[email protected]");
                    mail.To.Add("[email protected]");
                    mail.Subject = "Test Mail..!!!!";
                    mail.Body = "mail with attachment";
                    System.Net.Mail.Attachment attachment;
                    attachment = new System.Net.Mail.Attachment(@"C:\Attachment.txt");
                    mail.Attachments.Add(attachment);
                    SmtpServer.Port = 587;
    SmtpServer.UseDefaultCredentials = true;    ///Set it to false, or remove this line
                    SmtpServer.Credentials = new System.Net.NetworkCredential("userid", "Password");
                    SmtpServer.EnableSsl = true;
                    SmtpServer.Send(mail);
    Catch(Exception exception)
    Given Below is the Error..      The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
    Solution:
    The error might occur due to following cases.
    case 1: when the password is wrong
    case 2: when you try to login from some App
    case 3: when you try to login from the domain other than your time zone/domain/computer (This
    is the case in most of scenarios when sending mail from code)
    There is a solution for each
    solution for case 1: Enter the correct password.
    Recomended: solution for case 2: go to
    security settings at the following link https://www.google.com/settings/security/lesssecureapps and
    enable less secure apps . So that you will be able to login from all apps.
    solution 1 for case 3: (This might be helpful) you need to review the activity. but reviewing the activity will not be helpful due to latest security
    standards the link will not be useful. So try the below case.
    solution 2 for case 3: If you have hosted your code somewhere on production server and if you have access to the production server, than take remote
    desktop connection to the production server and try to login once from the browser of the production server. This will add exception for login to google and you will be allowed to login from code.
    But what if you don't have access to the production server. try
    the solution 3
    solution 3 for case 3: You have to enable
    login from other timezone / ip for your google account.
    to do this follow the link https://g.co/allowaccess and
    allow access by clicking the continue button.
    And that's it. Here you go. Now you will be able to login from any of the computer and by any means of app to your google account.
    Regards,
    Nabeel Arif

  • SMTP-auth via mailx results in service unavailable

    Why do my attempts to use mailx with Gandi SMTP fail with 'Service unavailable'?
    I have the following ~/.mailrc file which is recognised by mailx:
    set smtp=smtps://mail.gandi.net:465
    set smtp-auth=login
    set smtp-auth-user=harry@XXXXXXX
    set smtp-auth-password=XXXXXXX
    set from=harry@XXXXXXX
    set ssl-verify=ignore
    set nss-config-dir=/Users/neville/Thunderbird
    The result is below.
    From MAILER-DAEMON  Thu Dec 20 15:41:47 2012
    Return-Path: <>
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: by G4-N-2.local (Postfix)
              id D4E2DA382D6; Thu, 20 Dec 2012 15:41:47 +0000 (GMT)
    Date: Thu, 20 Dec 2012 15:41:47 +0000 (GMT)
    From: [email protected] (Mail Delivery System)
    Subject: Undelivered Mail Returned to Sender
    To: [email protected]
    Auto-Submitted: auto-replied
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
              boundary="78E73A382D4.1356018107/G4-N-2.local"
    Message-Id: <[email protected]>
    This is a MIME-encapsulated message.
    --78E73A382D4.1356018107/G4-N-2.local
    Content-Description: Notification
    Content-Type: text/plain; charset=us-ascii
    This is the mail system at host G4-N-2.local.
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    For further assistance, please send mail to postmaster.
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
                       The mail system
    <neville@XXXXXXX>: host spool.mail.gandi.net[217.70.184.6] said: 554 5.7.1
        Service unavailable; Client host [XXXXXXX] blocked using
        pbl.spamhaus.org; http://www.spamhaus.org/query/bl?ip=XXXXXXX (in
        reply to RCPT TO command)
    --78E73A382D4.1356018107/G4-N-2.local
    Content-Description: Delivery report
    Content-Type: message/delivery-status
    Reporting-MTA: dns; G4-N-2.local
    X-Postfix-Queue-ID: 78E73A382D4
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Thu, 20 Dec 2012 15:41:47 +0000 (GMT)
    Final-Recipient: rfc822; neville@XXXXXXX
    Action: failed
    Status: 5.7.1
    Remote-MTA: dns; spool.mail.gandi.net
    Diagnostic-Code: smtp; 554 5.7.1 Service unavailable; Client host
        [XXXXXXX] blocked using pbl.spamhaus.org;
        http://www.spamhaus.org/query/bl?ip=XXXXXXX
    --78E73A382D4.1356018107/G4-N-2.local
    Content-Description: Undelivered Message
    Content-Type: message/rfc822
    Received: by G4-N-2.local (Postfix, from userid 501)
              id 78E73A382D4; Thu, 20 Dec 2012 15:41:47 +0000 (GMT)
    To: neville@XXXXXXX
    Subject: test
    Message-Id: <[email protected]>
    Date: Thu, 20 Dec 2012 15:41:47 +0000 (GMT)
    From: [email protected] (Neville Hillyer)
    test email
    --78E73A382D4.1356018107/G4-N-2.local--

    http://www.spamhaus.org says:
    Mail servers only run spam filters such as Spamhaus PBL on port 25, so if you find you are being blocked by the PBL when you try to send mail to your mail server that means you are not communicating with the mail server on the 'authenticated' port 587 but you're still on port 25. This means your 'SMTP Authentication' is not working correctly.
    http://wiki.gandi.net/en/mail/standard-settings#smtp-account says:
    SMTP Account
    Name server : mail.gandi.net
    Port : 25, 465 (with SSL) or 587 (try one or the other)
    TLS or SSL: yes
    SMTP Authentication : yes, using the same settings as for the POP / IMAP account
    I was trying to use the same settings I have used for several years with Thunderbird and Apple Mail, ie SSL on port 465.
    Is there something wrong with my settings which could be preventing mailx from using port 465?
    A few debug tips would be appreciated.
    Your link causes me to ask:  Does the mailx on Leopard support SMTP directly?

Maybe you are looking for

  • WBS element need not to capture specific condition type value in Po

       Hi Gurus, example we have 2 PO document types a) consignment PO b) standard PO if in Consignment PO condition values are Basi Value 100 Excise 10 E cess 2 CVD 4 Total 116 Total = 116 this value goes to WBS commitment line item a) but in consignmen

  • E75 Email (Access Point problem)

    Hi,   I've setup nokia email without any problem using my WiFi and it was synchronizing without a problem. Since then I've I'm unable to change the Access Point to my Mobile provider. I keep getting "Server not found", even though the server name is

  • I can't see e-mail messages on my local folder disk location. Paranoid.

    I'm switching from POP to IMAP and in the process am trying to archive lots of messages in not-very-active topics/folders to my Local Folders. This all seems to work _great_. My messages are archived just where I expect them to be, and I can see them

  • Drawing a straight line over a video

    Is it possible to draw a straight line over a video in CS6 and also to watch the video frame by frame to take exact timings?

  • Premiere Pro CS6 Issues with AJA and Black Magic

    Has anyone had any issues outputting via AJA and Black Magic cards? I have 3 Macs using Black Magic Intesnsity Pro HDMI cards and 1 Mac using an AJA IO Express. On all the machines, i get weird audio issues intermitantly. I press play, no audio comes