My Server requires authentication
Hi guys
We have set up SMTP on Exchange front end and only for 5 managers, the server require auhtenticacion via SMTP. How I can set up this on Iphone?, if I use another POP3 such as Outlook Express i haven´t problems because Outlook express show me in the server "tab" the option "my server requires authentication", can someone help me?
Thanks in advance
MV
It started working later, not sure why. So it is possible. I consider this question answered.
Similar Messages
-
Server requires authentication - How do I program for this?
Hello,
I'm testing out a webpage I have created that will be used to send email. I have DSL service...just recently subscribed. Previously I had Dial up. The server at that time didn't require authentication, but now that I have DSL it does. I'm a bit lost as to how to update my program (I've included the snippet in the post), so that it will run correctly. I am having some difficulty.
My program looked like this :
String POP3 = "pop.windstream.net";
String SMTP = "smtp.windstream.net";
// Specify the SMTP host
Properties props = new Properties();
props.put(POP3, SMTP);
// Create a mail session
Session ssn = Session.getInstance(props, null);
ssn.setDebug(true);
//...html to make up the body of the message
// set the from information
InternetAddress from = new InternetAddress(emailaddress, fromName);
// Set the to information
InternetAddress to = new InternetAddress(EmailAddress2, toName);
// Create the message
Message msg = new MimeMessage(ssn);
msg.setFrom(from);
msg.addRecipient(Message.RecipientType.TO, to);
msg.setSubject(emailsubject);
msg.setContent(body, "text/html");
Transport.send(msg);
//.... I did some research already, and have looked at some other forum posts. The one thing I have noted when I run my program is that the dos prompt for tomcat is showing this:
*DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smpt,com.sun.mail.smtp.SMTPTransport,Sun Microsystem, Inc]*
DEBUG SMTP: useEhlo true, useAuth false
DEBUG: SMTPTransport trying to connect to hose "localhost", port 25
My ISP provider, Windstream, assures me that port 25 is NOT blocked. Also, I've noticed that useAuth is set to false, whereas the posts I have been looking at say true. It would make sense to me for it to be set to true in my case, since my server requires authentication. But how do I do that?
I found this bit of information from another person's post :
props.setProperty("mail.smtp.auth", "true");
you also need an Authenticator like this
Authenticator auth = new Authenticator() {
private PasswordAuthentication pwdAuth = new PasswordAuthentication("myaccount", "mypassword");
protected PasswordAuthentication getPasswordAuthentication() {
pwdAuth;
Session session = Session.getDefaultInstance(props, auth);*
Post located at http://forums.sun.com/thread.jspa?forumID=43&threadID=537461
From the FAQ section of JavaMail
Q: When I try to send a message I get an error like SMTPSendFailedException: 530, Address requires authentication.
A: You need to authenticate to your SMTP server. The package javadocs for the com.sun.mail.smtp package describe several methods to do this. The easiest is often to replace the call Transport.send(msg); with
String protocol = "smtp";
props.put("mail." + protocol + ".auth", "true");
Transport t = session.getTransport(protocol);
try {
t.connect(username, password);
t.sendMessage(msg, msg.getAllRecipients());
} finally {
t.close();
You'll have to supply the appropriate username and password needed by your mail server. Note that you can change the protocol to "smtps" to make a secure connection over SSL.
One thing I have noticed in the majority of the posts is that useAuth in the tomcat dos prompt should be set to true, and not false. Mine is coming up as false. Also, I think it should be set to true because the ISP's server requires authentication for sending and receiving email.
Can you please provide me with some input on how to update my program so it will run?
Thank you in advance:)Thank you for replying.
Per your advice, I made these changes to my code:
Properties props = new Properties();
props.setProperty("mail.smtp.auth", "true");
props.put("mail.pop3.host", POP3);
props.put("mail.smtp.host", SMTP);
Session ssn = Session.getInstance(props, null); The props.setProperty("mail.smtp.auth","true"); is something I found previously to posting my question. I'm assuming this is the line of code that has changed useAuth from false to true...is that correct?
I'm most pleased to report that with the changes made above, my program works! But is my code good? As soon as I start taking on clients, I will need my code to be reliable, and it needs to work with Dial Up and DSL connections.
With regards to your question about how I had found the authentication code but hadn't used it. Well, I did try it, again, this was previous to posting my question, and the compiler couldn't compile the program because of this statement - pwdAuth;
I also tried this code I had found in the JavaMail FAQ section -
String protocol = "smtp";
props.put("mail." + protocol + ".auth", "true");
Transport t = session.getTransport(protocol);
try {
t.connect(username, password);
t.sendMessage(msg, msg.getAllRecipients());
} finally {
t.close();
}But according to the compiler, t.connect(username,password); was not an available method. I checked the documentation and found that to be true. Do you have any suggestions? Looking into the documentation I find that there are 3 methods called connect that are inherited by the Transport class from javax.mail.Service.
connect()
connect(java.lang.String host, int port, java.lang.String user, java.lang.String password)
connect(java.lang.String host, java.lang.String user, java.lang.String password)
I would opt to try the third connect method, but what would I put for host?
Thank you for helping me with this issue, I'm not an expert on using the JavaMail package, at least not yet, and I appreciate the help you have provided. -
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 -
Email server needs authentication
I want to send an email from a Creator project, but my email server requires authentication. The sun.net.smtp.SmtpClient does not seem to provide an API for that.
Can anyone supply a solution?I want to send an email from a Creator project, but
my email server requires authentication. The
sun.net.smtp.SmtpClient does not seem to provide an
API for that.
Can anyone supply a solution?Try JavaMail.
http://java.sun.com/products/javamail/index.jsp
It has the bells and whistles that allow you to provide authentication. Search/google the web for
"Javamail authentication" and look for examples.
It's not as simple to use as SmtpClient, but has the
flexibility to do many things.
-Joel -
My previous request had an incorrect email. This error began yesterday and I can't reply or send new emails from my PC, but email is working on my iphone.
I have been doing that. Here is the complete message I get. It was cut off in my initial question. "An error occurred while sending mail. The mail server responded: Authentication is required before sending [R0107005]. Please verify that your email address is correct in your Mail preferences and try again."
-
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 Kumartry
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 -
Can gmail smtp server be used (requires authentication)
I would like to configure my 10g XE environment with Apex to handle email.
However, I don't want to set up an SMTP server on my environment. Instead I would like to route to the gmail smtp server.
But gmail like many SMTP servers requires authentication and TLS security. Can authentication be coded into the calls or any suggestions on how to handle?
Thanks,
StephenWith an Virtual Directory solution, you can authenticate Iplanet Web Server against nearly anything including any LDAPv3 Directory Server, Microsoft Active Directory, Windows NT Domains, Oracle RDBMS, IBM DB2 RDBMS, Microsoft SQL, and others.
All of this is done dynamically and doesn't require any heavyweight synchronization process. The Virtual Directory acts as a dynamic schema / DIT / data translation engine for different types of repositories.
OctetString's Virtual Directory Engine is one such example. You can download a 30 day evaluation copy at:
http://www.octetstring.com
It will take you all of 30 minutes to get iPlanet Web Server authenticated against and using groups from things like Oracle RDBMS, Windows NT Domains, or Active Directory. -
The SMTP server requires a secure connection or the client was not authenticated. -.
Hello
I wrote this code. I searched but could not find a solution for my problem.
private void button_sendemail_Click(object sender, EventArgs e)
string temp = "mygmailpassword";
System.Security.SecureString password = new System.Security.SecureString();
temp.ToCharArray().ToList().ForEach(p => password.AppendChar(p));
string mailfrom = "…@gmail.com";
string mailto = "…@yahoo.com";
string subject = "Hello";
string body = "Hello, I'm just writing this to say Hi!";
using (MailMessage mail = new MailMessage())
mail.From = new MailAddress(mailfrom);
mail.To.Add(mailto);
mail.Subject = subject;
mail.Body = body;
mail.IsBodyHtml = true;
// Can set to false, if you are sending pure text.
using (SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587))
smtp.UseDefaultCredentials = false;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = new NetworkCredential(mailfrom, password);
smtp.EnableSsl = true;
smtp.Send(mail);Hi ARZARE,
After some research and i have tested your code, it works fine on my side. But i used Hotmail
using (SmtpClient smtp = new SmtpClient("smtp.live.com", 587))
Per my understanding, you're trying to send from an @gmail.com address and they will require authentication, but you don't have credentials specified. Try sending from @hotmail.com or change smtp.EnableSsl
= false to see what happens.
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Firefox required Authentication when enter in reporting services, only in firefox and safari
Hi SSRS required authentication when enter in Firefox an safari, work fine in IE, GOOGLE AND OPERA
this link not work, firefox required credentials:
https://support.mozilla.org/en-US/kb/Firefox%20asks%20for%20user%20name%20and%20password%20on%20internal%20sites
I want only configure in server, not in client side.I have done this configuration for safari:
http://stackoverflow.com/questions/22108080/cant-connect-to-ssrs-in-php
If you are using default values, you can copy the minimum element structure:
<AuthenticationTypes>
<RSWindowsBasic/>
</AuthenticationTypes>
But this required credentials in other browsers and when reset the server throw error. -
Accessing a WMS created with Geoserver that requires authentication
Can I create a WMS theme in Map Viewer that is served from Geoserver? This Geoserver WMS requires authentication. I can access it in ArcGIS but I don't know how to access it in Map Viewer.
Where is the Authentication? The following operates are done in 11.1.1.7.1. Is there any problem? Please talk more detail!
1.Create a WMS theme by Using the Map Builder tool. It's name is wms_theme130wps. The result is the following:
Record contents to be stored into USER_SDO_THEMES
NAME: wms_theme130wps
DESCRIPTON:
BASE_TABLE: WMS
GEOMETRY_COLUMN: WMS
STYLING_RULES:
<?xml version="1.0" standalone="yes"?>
<styling_rules theme_type="wms">
<service_url> http://localhost:8080/mapviewer/wms? </service_url>
<user> wms </user>
<password> +wE1RbfVl94yXdaLJKtG09v64OPJtG40 </password>
<layers> COUNTIES_TERR </layers>
<version> 1.3.0 </version>
<srs> EPSG:4326 </srs>
<format> image/png </format>
<bgcolor> 0xA6CAF0 </bgcolor>
<transparent> true </transparent>
<exceptions> xml </exceptions>
<capabilities_url> http://localhost:8080/mapviewer/wms? </capabilities_url>
</styling_rules>
2. Request with the URL, http://localhost:8080/mapviewer/wms?REQUEST=GetMap&VERSION=1.3.0&LAYERS=wms_theme130wps&WIDTH=1500&HEIGHT=560&CRS=SDO:8307&BBOX=-180,-90,180,90&FORMAT=image/png.
This request is without any Authentication message!
3.Request returns a PNG Image. -
I need to scrape external content but my Portal Server lies in my Intranet. The company has a Proxy server that needs authentication in order to browse the Internet.
In the gateway settings, I have made the entries:
iplanet.com|
* Proxyip:proxyport|
This works in the sense that the gateway contacts the proxy for the content, but I get the Proxy Authentication failed page.
Where do I pass my username and password?
Regards,
VibhaAt the present time, you cannot use URLScraper with proxies that require authentication. You can either reconfigure the proxy to not require authentication when accessed by the portal, or create your own custom provider to pass proxy authentication information in the HTTP header.
Stephen -
Must connect to file share requiring authentication against AD
I need to provide a link on a JSP that will transfer a file over HTTP, but the file is located on a file share (a directory) that requires authentication over HTTP. The files used to be stored on a directory that did not require authentication, so it was easy:
//construct URL to file
response.sendRedirect(url);But doing that now gives me the dialog to enter an ID/password.
How do I attack this? Is it a JNDI thing? Should I be looking into the java.net package? I'm thinking I'm going to have to find some way to connect to the directory, read the content of the file I want, and then manually perform the stream to the client. any suggestions/experience?//construct URL to file
response.sendRedirect(url);But doing that now gives me the dialog to enter an
ID/password.Who is "me"? Do you get a dialog box on the machine where your application server is running, or do you get the dialog box in your browser? -
NAC Guest Server SMTP Authentication
Does anyone know if you are able to set your SMTP server in the NAC Guest Server to do SMTP Authentication? Our old Exchange server just let us specify the SMTP server and send the guest accounts their Username and Password to their outside accounts. Our new Exchange server requires SMTP authentication, but we do not see the option available in the NAC Guest Server interface. We are running NAC Guest Server 1.1.3. Any ideas would be appreciated. Thanks!
I have Cisco NAC Guester server 2.0.2 and have sort of similar issues.
I configured the Base DN to the OU of the sponsor groups in AD and then map that particular group in roles. Users from that group can log on fine and create guest accounts.
The problem is, it seems that other users from that OU seems to be able to log on as sponsors too. How do I restrcit this to just that sponsore group? I tried changing the Base DN to the OU of the sponsore group then enter CN=sponsorgroup to narrow it to just that group but still other users can log in as sponsors. -
ISP requires authentication for outgoing email
On my Samsung Droid, my ISP requires authentication for outgoing email. I don't see this as an option and so all my supposedly sent items are sitting in my Outbox. Anyone else have this issue? My Gmail and Hotmail accounts work just fine. Thx
110/25 or.....
POP3/IMAPAccount
ServerType
Incoming Server
Incoming Port
Usesecureserver
VerifyCert.
Outgoing Server
OutgoingPort
Use secureserver
VerifyCert.
Aim.com
IMAP4
imap.aim.com
993 (or 143)
Yes
Yes
smtp.aim.com
465 (or 587)
Yes
Yes
aol.com
IMAP4
imap.aol.com
993 (or 143)
Yes
Yes
smtp.aol.com
465 (or 587)
Yes
Yes
Aim.com
POP3
pop.aim.com
995
Yes
Yes
smtp.aim.com
587
Yes
Yes
aol.com
POP3
pop.aol.com
995
Yes
Yes
smtp.aol.com
587
Yes
Yes
att.net
POP3
pop.att.yahoo.com
995
Yes
Yes
smtp.att.yahoo.com
465
Yes
Yes
bellsouth.net
POP3
pop.att.yahoo.com
995
Yes
Yes
smtp.att.yahoo.com
465
Yes
Yes
charter.net
IMAP4
mobile.charter.net
993
No
No
mobile.charter.net
587
No
No
charter.net
POP3
mail.charterinternet.com
110
No
No
smtp.charterinternet.com
25
No
No
comcast.net
POP3
mail.comcast.net
995 (or 110)
No
No
smtp.comcast.net
587
No
No
cox.net
POP3
varies by location
995 (or 110)
Yes
Yes
varies by location
587 (or 465)
No
No
earthlink.net
POP3
pop.earthlink.net
110
No
No
smtpauth.earthlink.net
587 (or 25)
No
No
excite.com
POP3
pop3.excite.com
110
No
Yes
smtp.excite.com
25 (or 587)
No
Yes
flash.net
POP3
pop.att.yahoo.com
995
Yes
Yes
smtp.att.yahoo.com
465
Yes
Yes
gmail
IMAP4
imap.gmail.com
993
Yes
Yes
smtp.gmail.com
465
Yes
Yes
Go Daddy Accounts
POP3
pop.secureserver.net
995 (or 110 w/out Secure connection)
Yes
Yes
smtpout.secureserver.net
465 (or 25 w/out Secure connection)
Yes
Yes
hotmail
POP3
pop3.live.com
995
Yes
Yes
smtp.live.com
587
No
Yes
lycos.com
POP3
pop.mail.lycos.com
110
No
Yes
smtp.mail.lycos.com
25 (or 587)
No
Yes
mac
IMAP4
mail.mac.com
993
Yes
Yes
smtp.mac.com
25 (or 587)
No
No
me
IMAP4
mail.me.com
993
Yes
Yes
smtp.me.com
25 (or 587)
No
Yes
mindspring
POP3
pop.mindspring.com
110
No
No
smtpauth.earthlink.net
587 (or 25)
No
No
msn.com
POP3
pop3.live.com
995
Yes
Yes
smtp.live.com
587
No
Yes
netzero.net
POP3
pop.netzero.com
110 -
Problems invoking external web page that requires authentication
We have a web service deployed to OAS 10. This web service needs to be able to open a URL and read the results. This URL requires authentication.
We have a subclass of Authenticator that provides the user name and password.
When we run this web service using the debugger from JDeveloper, it works just fine. However, when deployed to the app server, it fails.
java.io.IOException: Server returned HTTP response code: 401 for URL: http://... at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
I've stripped out the URL details, but it's invoking a report using Microsoft's SQL Reporting Services.
If I read the error stream, it indicates that request couldn't be authenticated.
So, I'm hoping some people here can point me at what's different between the debugger environment and the application server environment. We suspect that it may be related to permissions in a java policy file, or perhaps some other file from which the application server derives its permissions. But our fiddling with these hasn't helped so far.
So, any ideas as to what went wrong? Ideas on how to open things up so this works?
Thanks in advance for any help provided.
BTW, if there's a better forum into which this should be posted, please let me know.Greetings,
401 indicates authentication failure, as you have stated. Once deployed, have you attempted to access the report URL using the uname\pword combination with the strings which are hard-coded in your subclass? You can turn up logging to FINEST and customize what logging on the server returns. Login to your OAS administration portal and review the logging options there. If you start the server from the command line, you can view the output there real-time.
-Michael
Maybe you are looking for
-
Error when trying to restore from backup
I just received an iPod replacement and when I go to restore from backup it gives me an error. The photos are restored but no music or video. Any suggestions? Thanks
-
Hi , Recenlty i have bouhgt new iphone5s from middle east . When i was using the phone over there the facetime was working perfect for me . Now when i moved to another country i can not see the facetime option in the iphone . Could you pls suggest h
-
Sujjestion regarding database switch in case of failure
Hello all , I need a sujjestion on database switching in case of failure ...... production database server is : sun solris test database server is : Linis ES 4 Database is Oracle 10.2 About backups I have full database rman backup and everyday export
-
Playing more than 1 video/podcast/movie in a row
How can I use iTunes to play a whole series of movies/video podcasts at a time? I have a whole bunch of short films and video podcasts & wanna play one-after-another in iTunes. I cannot seem to get iTunes to do this for me. I wanna just sit back and
-
WSDL Validation Failed (Web Services)
I want to create a Web Service-Based Application in LabVIEW and I'm trying to go through the steps in the tutorial http://zone.ni.com/devzone/cda/tut/p/id/4728. I tried the following web services, but I always get the same error. http://coeservice.en