Gmail POP3 with openssl command line: hangs while RETR-ing
I had a similar problem when testing an SSL connection to GMail's SMTP server.
The AUTH
and MAIL FROM
commands worked fine but when I tried the RCPT TO
the server returned the RENEGOTIATING
response.
After searching for quite a bit I finally found a site that explained what was going on.
Apparently the uppercase R
at the start of the command (RCPT TO
for SMTP and RETR
for POP3) causes the s_client tool to renegotiate with the server.
The man page for s_client has some info in the "CONNECTED COMMANDS" section.
I managed to get my SMTP test working by using lowercase commands (rcpt to
). I've just tried a test with GMail's POP3 server and using retr 1
works well.
Related videos on Youtube
desicreatioNZ
Updated on September 17, 2022Comments
-
desicreatioNZ over 1 year
I am using this to display profile picture on every page on the system but only works with few pages.
<g:if test="${userAccount?.photo != null && !(userAccount?.photo.empty)}" > <g:link controller="userAccount" action="myInfo" id="${userAccount.id}"> <img id="profile_photo" src="${createLink(controller:'image', action:'profilePhoto', id:userAccount.photo, params:[maxWidth:190.0,maxHeight:190.0])}" alt="${userAccount.photo}" title="${userAccount.displayName()}" /> </g:link> </g:if> <g:else> <g:link controller="userAccount" action="myInfo" id="${userAccount.id}"> <img id="profile_photo" src="${resource(dir:'images', file:'no_image_blue.gif')}" alt="No Image" width="200" height="200"/> </g:link> </g:else>
I am also using 2 layouts and
Spring security plugin
for this project. Could anyone please help me out here to make an image gets displayed on entire system.**
I simply need to know how can i store users Photo varaible to session so i can access it anywhere in the application.
**
-
Admin over 13 yearsThanks that helped me a lot Kevin. the retr worked (lower case was correct!)
-
desicreatioNZ over 11 yearsI am already doing.. Its not passing my userAccount params(vars) to places where i use custom layouts instead session user details are available but photo is linked with userAccount not sessionUser.
-
coderLMN over 11 yearsIf your problem is about image width and height, move
params:[maxWidth:190.0,maxHeight:190.0]
out ofcreateLink
tag and put it as part of<img>
tag, like:<img .... style="maxWidth:190px;maxHeight:190px;">
-
desicreatioNZ over 11 yearsThanks but my problem is displaying dynamic image of sessions user across the entire application at the moment it is displaying only on 1 page and that is profile user page.
-
desicreatioNZ over 11 years"photo" variable of UserAccount is not available on everyother page on the system I dnt know how to access it really but session user is available but it doesn't have photo property linked to it. Do i need to write a new action or function for displaying profile image across the system? or do i need some sort of syntex to make the userAccount or user Instance available?
-
desicreatioNZ over 11 yearsat the moment my profile image action is something like this: def profilePhoto = { response.setContentType('image/jpeg') response.setHeader('Cache-control', 'no-cache') def userId = session.selectedUser.id if(params.userId){ userId = params.userId } if(params?.id != null && !(params?.id.empty)){ params.maxWidth?: 190.00 params.maxHeight?: 190.00 response.outputStream << imageProxyService.loadThumbnailImage(params.id, securityService.passwordEncoder(userId.toString())) } }
-
coderLMN over 11 years
userAccount
should be passed from all other controller actions to the views, otherwise all the reference to it in the layout gsp won't work. Do you use some security framework like spring security? If it is the case you can use its helper tags. Or just put it in session or cookies. -
desicreatioNZ over 11 yearsYes I do use spring security.. could you please give me an example how to go by? I have page import script on every page but i guess I will have to add the photo property to session or use helper tags as you adviced... but not sure how to do so...
-
coderLMN over 11 yearsyou can use something like
<g:set var="photo" value="${sec.loggedInUserInfo([field:'photo'])}"/>
to get your currentUser's properties. I'll update my answer later. -
desicreatioNZ over 11 yearsThanks I am fairly close to solve this problem as based on your advice I am starting to get this '<img id="profile_photo" src="/IwiOra/image/profilePhoto?maxWidth=190.0&maxHeight=190.0" alt=""/>'
-
desicreatioNZ over 11 yearsJinzhao- When setting photo <g:set var="photo" value="${sec.loggedInUserInfo([field:'photo'])}"/> gives me an error of null value. I simply need to know how can i store users Photo varaible to session so i can access it anywhere in the application.
-
coderLMN over 11 yearsDo you have a
photo
property defined in yourUser
domain? Post your User class definition please. -
desicreatioNZ over 11 yearsYes I have photo property in User domain. Its just that I need to save or store value from userAccount.photo to session properties then I can access users photo property anywhere on the system.
-
coderLMN over 11 yearsIf you put my code in layout, you already have it in all your gsp views, but if you really want to do that, you can follow stackoverflow.com/questions/13757368/… to put photo property into session after a user login.
-
desicreatioNZ over 11 yearsIf I do it your way It gives me an error message because userAccount is only accessible to main page. for instance: I have two views inner and profile and photo template which lies at the base of the view. so from homepage/home(uses inner layout) I call photo template and it works but if i use profile layout instead it doesn't work because it cannot locate userAccount and its properties. I have no idea whats going on here. I am new to advanced grails and someone else wrote most of this program for me.
-
desicreatioNZ over 11 yearsI believe I am using the same code but removed few unrelated things. but still I will check it again to make sure and get back to you. by the way could you show me a syntex which stores the value of a variable.
-
desicreatioNZ over 11 yearsI have checked it and despite using the same code on both layouts its not working on one layout.. probably non-working layout has been used in different pages. I think I should go with session way of doing it. so could you suggest me how to store user info into sessions. Thanks
-
coderLMN over 11 years