mailcore2 163.com/126.com NO SELECT The login is not safe - mailcore2

I have the following configuration for mailing features:
self.session.clientIdentity.version = #"1.0.0";
self.session.clientIdentity.vendor = #"1ihoo.0";
self.session.clientIdentity.name = #"1mail.0";
self.session.hostname = self.account.imapHost;
self.session.port = self.account.imapPort;
self.session.username = self.account.email;
self.session.password = self.account.password;
However, this results in an error:
function:__31-[SMImapConnection setAccount:]_block_invoke line:125 content:data: 5 ID (version "1.0.0" name "1mail.0" vendor "1ihoo.0")
function:__31-[SMImapConnection setAccount:]_block_invoke line:125 content:data: 5 BAD Parse command error
function:__31-[SMImapConnection setAccount:]_block_invoke line:125 content:data: 6 SELECT INBOX
function:__31-[SMImapConnection setAccount:]_block_invoke line:125 content:data: 6 NO SELECT The login is not safe! Please update your mail client: http://mail.163.com/dashi
I don't think it's wrong, but I don't know why I did it.

maybe you should try select command before ID just like this:
a1 SELECT INBOX
a2 ID (version "1.0.0" name "1mail.0" vendor "1ihoo.0")

Related

How can I set base API? I see double quotes getting added from the first API's response

Given path '/api/metrics/product/ABC'
When method get
* def id = get response
* print id
* def basePathProducts = '/another/api/' + id + '/param'
Given path basePathProducts
When method GET
Then status 200
12:59:28.447 [main] INFO com.intuit.karate.StepDefs - [print] "5ca627bf3edd851238e59c9e" Apr 16, 2019 12:59:28 PM org.glassfish.jersey.logging.LoggingInterceptor log SEVERE: 2 * Sending client request on thread main 2 > GET
http://localhost:8080/API/ANOTHER/API/%225ca627bf3edd851238e59c9e%22/PARAM
I think you are overcomplicating things and you missed that the path syntax is designed for what you commonly need to do.
Don't def basePathProducts and do this, see how the id variable can be easily plugged into a path:
Given path 'another', 'api', id, 'param'
Your post is really hard to comprehend.
Try using
Given url yourURLVariable + 'another/api/'+ id + '/param'
Refer to this for more information : https://stackoverflow.com/a/54477346/10791639
Edit :
There is a problem with your parameter.
* def id = "5ca627bf3edd851238e59c9e"
* print id
Gives :
13:24:19.783 [print] 5ca627bf3edd851238e59c9e
So your variable id is "5ca627bf3edd851238e59c9e" instead of 5ca627bf3edd851238e59c9e
* def newresp = function(id){ return id.slice(1, -1); }
* def id = newresp(response)
I added these to remove the first and last characters from the response which is the double quotes in my case. Thanks for responding guys!

How to send parameter to WhereRaw() in Laravel?

I have 2 tables.
paylog: account, id, orderdate.
users: acid, ownerid, password
I want to run this command
$acid ='vnt';
SELECT * FROM paylog WHERE EXISTS(SELECT 1 FROM users WHERE users.ownerid=$acid)
$acid = 'vnt' ;
$paylogs = DB::table('paylog')->whereExists(function($query){
$query->select(DB::raw(1))->from('users')->whereRaw("users.ownerid = ?", array($acid));
})->get();
But this got error.
Please help to solve this problem.
Thanks.
You have to make $acid available inside the closure:
function($query) use($acid) {

Update a Table using a Join

I wish to update a table using, but need to use another table to get the correct field. The new information is not taken from another field from another table.
The following SQL statement returns the correct information:
SELECT PURCHASEHEADER.ORDERNOTES
FROM PURCHASEHEADER, ASSEMBLYLINESOURCE
WHERE ASSEMBLYLINESOURCE.HEADERSYSUNIQUEID = 72637001
AND PURCHASEHEADER.ORDERNUMBER = ASSEMBLYLINESOURCE.PURCHASEORDERNUMBER
I have tried the following:
UPDATE PURCHASEHEADER SET PURCHASEHEADER.ORDERNOTES = 'Updated'
WHERE EXISTS (
SELECT 1 FROM ASSEMBLYLINESOURCE
WHERE PURCHASEHEADER.ORDERNUMBER = ASSEMBLYLINESOURCE.PURCHASEORDERNUMBER
) AND ASSEMBLYLINESOURCE.HEADERSYSUNIQUEID = 72637001
An error is returned saying: " ...Column Unknown ASSEMBLYLINESOURCE.HEADERSYSUNIQUEID..." but it does exist as it works in the first query.
I have seen similar posts from Mark Rotteveel dated July 2017, but still can't get it to work.
There is an issue with your closing bracket. Try this, it worked for me.
UPDATE PURCHASEHEADER set PURCHASEHEADER.ORDERNOTES = 'Updated'
WHERE EXISTS (SELECT 1 FROM ASSEMBLYLINESOURCE WHERE
PURCHASEHEADER.ORDERNUMBER = ASSEMBLYLINESOURCE.PURCHASEORDERNUMBER AND
ASSEMBLYLINESOURCE.HEADERSYSUNIQUEID = 72637001)

sql query in orange datamining software

When I am trying to run a SQL query in orange datamining software using select statement and postgres database, it returns an error
INVALID CONNECTION OPTION 'PASSWD'
My query looks like this:
select * from CFAR_K7_DBTF_ALL;
This error is still valid, while there is 4 years old open ticket: http://old.biolab.si/trac/ticket/1218
I made this change to make it work:
--- Orange\data\sql.py
+++ (clipboard)
## -106,6 +106,7 ##
}
if schema == 'postgres':
argTrans["database"] = "dbname"
+ argTrans["password"] = "password"
elif schema == 'odbc':
argTrans["host"] = "server"
argTrans["user"] = "uid"

How to query Oracle v$ tables using Groovy

I'm trying to query the Oracle v$session table using Groovy (imported groovy.sql.SQL) like this:
sql.eachRow("""
Select
'Y' as runInd
from v$session
where upper(module) = ?
having count(*) > 1
""", [programName]) {row -> etc...}
But Groovy keeps telling me: "Groovy:Apparent variable 'session' was found in a static scope but doesn't refer to a local variable, static field or class."
It apparently doesn't like the table called v$session. I've tried many things, I'm not sure why I can't find out how to do this. Any help is appreciated. Thanks!
Tom
Instead of """ which marks it as a multi-line templated groovy string, try ''' which shouldn't try to template things following a $:
sql.eachRow( '''Select
| 'Y' as runInd
| from v$session
| where upper(module) = ?
| having count(*) > 1'''.stripMargin(), [programName]) { row ->
etc...
}