Email variables are allowed only within the context of the session - informatica

I have created one independent email task after session to generate failure details email. I have provided information for user and status fields But when I'm trying to add email body in text field all built in email variables are disabled. It says email variables are allowed only within the context of the session.
Can anyone please help me how can I access the email variables in independent email task. I also need to attach session log file with the email.
Appreciate your help
Thank you

Make a dummy mapping and session, you can use built in email variable in that session.
Dummy mapping can have source and target as flatfile (not necessarily having any data).

you can set the configure the email in your actual session it self. in component- post session success/failure.

Either use post-session on-failure email (recommended) or build the message body within the mapping, store it in a variable and use post-session variable assignment to use it on workflow level for the email task.

Related

It's regarding AWS Cognito email customization?

In Cognito I have created the user name with an unique id for example (dbdhdydhdhhdh) and I am putting my email address to get the temp password to log in my UI ?
But when I receive an email it's shows my unique id instead of name. So I trigger the lambda function to get my name in the email .My lambda is working fine and it's shows my user name when I get the password but along with the username the unique id is also reflecting.
Any suggestion how can I hide that unique id please ?
Aws Cognito has lambda triggers may be you can customize your email content in that lambda trigger.
Please find the link [https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html]
Your question is not very clear, If I understood it correctly you want to send a custom email with other attributes (given_name, family_name etc), it is possible with Lambda triggers.
Have a look at this link - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html
Your user attributes should be coming inside
event.request.userAttributes
and you should be able to use them in your email message.

AWS Cognito custom auth - sending metadata to a challenge lambda functions

I'm developing a custom passwordless auth to sign into a Cognito user pool. I will describe what I'm trying to implement in case anything is silly. I want a user to enter their email address, then receive a magic login link via email, and when they click on that be taken back to the site and be logged in.
This uses custom auth lambda functions to define/create a challenge with a time based password and send it to the user in an email. I am having a couple of problems:
Problem 1)
When the user returns with the code they might not be in the same browser/device and certainly won't be in the same tab so they don't have the session, meaning I need to call cognitoUser.initiateAuth again. This goes through the define/create challenge lambdas again so a second email gets sent even though at this point the user is coming from the email link so already has the code. Note: the session id is not available in the event object when the challenge is created, also I've read these sessions only last 3 minutes and my time based passwords will last ~15minutes, so I don't think I can include the session id in the email.
Problem 2)
You can login from a few places (browser, android app, etc) and I would like to be able to include the url or at least protocol as a parameter to control what gets sent in the email, e.g. if you entered your email address in the android app then the email you get would be myapp://login?code=xxx and if you did it on the web it would be https://example.com/login?code=xxx
It seems like I would be able to implement both of these to work properly if only I could find some way to send custom metadata through to the DefineChallenge and CreateChallenge lambda such that it would appear in the event object. I thought adding ValidationData to the AuthenticationDetails object would do this, but that information doesn't appear in the event object in the Lambda fns.
The workaround I've found is to create a new client id for every situation - one for initiating auth, one for redeeming token, and repeat for each different protocol. But that is a lot of client ids quickly - a pain to mantain and clumsy.
So tl;dr is: I want to send custom metadata from my cognitoUser.initiateAuth(...) call in JS and have it available in my Define/Create Challenge lambda fns.
You can split the authentication process into multiple custom auth challenges. This allows custom auth state to be supplied via the challenge response as client metadata.
Auth session state must be persisted in a database in order to be shared between devices.
Your custom login flow will probably have two challenge steps: the first prompts for auth type and the second prompts for the secret code. The action taken by the "Create Auth Challenge" Lambda will depend on the auth type. If the auth type is "Email" then the secret code and magic link are generated, stored in DynamoDB and emailed. If the auth type is "MagicLink" then the secret is loaded from DynamoDB. Clicking on a Magic link will initiate a new auth session and automatically supply all the challenge answers.
There are a few other things to consider:
Your magic link needs to encapsulate the Cognito username as well as the one-time secret and probably some other session id that is used as a key in dynamodb.
You probably should not put app-specific links into your emails. Instead associate your domain with your app and/or leverage the redirect URI parameter of your web-based login page.
You can also access custom Cognito user attributes from the Lambda function which can be used to indicate user login preferences (eg Email vs SMS for login codes).

Vtiger : How we have to manage Email thread on Lead Module?

We are sending email to customer from Lead module and email sent to customer successfully from Vtiger. also we have integrate Mail Manager
in Vtiger.
i can also see that email in Sent box.
now, When Customer will give reply for that mail which i have sent from Lead module that will automatically appear in Lead Module Email Tab. right now i am getting am reply in Mail Box but i need log email in Lead section with particular customer replay.
Please help me if anyone solution..
It's by default functionality which is provided by Vtiger CRM.
We have configure Mail Scanner and select folder which we have to scan.
also, we have add condition or rule for this what we have to do if we can get result while scanning.
Please check status for MailScanner in vtiger_cron_task table. it must be 1.
also we have to set vtigercron.php in cronjob.
you can also run vtigercron.php in console on server with below command
php vtigercron.php
After success full scan you can get below message
Please Let me know if you have any question.

Receiving emails with sendgrid and cloudmailin

I have the same concept as mentioned in this question(generating a unique random email address for each user in rails app. When the user sends an email that that randomly generated email address, we process the body and store in db.
I followed the following steps:
Deployed my app in Heroku
Created a sendgrid account and configured the username and password to heroku(to get the sendgrid addon).
added griddler gem and followed the steps mentioned in griddler.
Configured the parse webhook in sendgrid with my host and url.
Here comes the main problem:
I registered to coludmailin and it generated the single email address. I don't really understand how to receive uniq emails to my rails application now. I tried white labeling the cloudmailin.net in sendgrid but it doesn't work(may be am wrong here).
Googled a lot but didn't understand how to proceed from here. Can someone please help me in solving this issue. Appreciate if I get a good step-by-step reference
There are two options to do this with CloudMailin.
Option 1:
On the free plan you can use a + in order to separate the email address given to you on CloudMailin and still create a unique email address that each customer can respond to. For example:
If you CloudMailin email address is example1234#cloudmailin.net you can use example1234+unique_id_54321#cloudmailin.net. CloudMailin calls unique_id_54321 the disposable part of this email address. This way you can send an email out and state the sender of that email is example1234+unique_id_54321#cloudmailin.net and then tell one user from another.
Option 2 (the better option):
However, the best way to do this is to use CloudMailin's custom domains. You can then receive anything#yourdomain.com.
With custom domains enabled you set CloudMailin up to be your MX server. Then any email coming into yourdomain.com goes direct to CloudMailin (you can use app.yourdomain.com to avoid conflicts with your regular email if needed).
You can then send email out with the sender as user-12345#yourdomain.com, task-12345#yourdomain.com or any other unique identifier. When you receive the email from CloudMailin the envelope will show that the email was sent to user-12345#yourdomain.com and you can then use this to resolve who the user was.

User of stored process, which variable to use?

When i look in a SAS log, there are 4 different Variables to grab User:
_METAPERSON
_METAUSER
_SECUREUSERNAME
_USERNAME
When i check the log, all 4 variables have the same value when i execute the process. So i builded a process which checked _Metauser for some specific user, so that only the users i wanted could do something.
But a colleague of me had the problem that in the variable was not the username stored for him when he called the process, but username#Context. In the other 3 variables, there was only username stored for him, so maybe i can change to one of them. I can not use Metauser, because for some persons there could be an #Context after username.
No i have the problem, which variable to use? What is the difference between the 4 variables? Which to use, to be sure that i only (and always) get the pure username, no matter from where and which programm/Version the User is calling the process?
At the moment i use Sas 9.3 and run the process via webservice
I switched to SECUREUSERNAME for now, but i am not sure if this can make problems for other users, at the moment only 3 work with this process, but there will be a lot more soon
Our authorization concept is based on metadata, so i think maybe i should use _Metaperson...
The _SECUREUSERNAME macro variable is created when the application server executes a Stored Process. The value of _SECUREUSERNAME contains the client identity and this value will be written into the _USERNAME macro variable if _USERNAME doesn't already contain a value.
Under most circumstances, the value of _SECUREUSERNAME will be the same as _USERNAME
_USERNAME Specifies the value for the user name obtained from Web client authentication.
_METAPERSON Specifies the Person metadata name that is associated with the _METAUSER login variable. The value of this variable can be UNKNOWN. This variable cannot be modified by the client.
_METAUSER Specifies the login username that is used to connect to the metadata server. This variable cannot be modified by the client.
There is no easy answer to your question, because it depends on your set up. Do your users have to login by using Metaserver? Is your code always accessed using the WebService? User IDs, what are they, are they ID from AD? Is Single-Sign-On (SSO) enabled? How are the IDs configured on SAS? Do people use Trusted Users to connect?
Regards,
Vasilij
I am using _METAUSER. Now, our systems are set up with SSO, so the username is always without the "#". I have used it without SSO as well, but then I had to use %scan(&_METAUSER,1,#) to strip away the #context part.
From testing in a Stored Process session, 9.2 (windows) environment with SSO:
OS username (in my case, my windows ID)
_METAUSER (when signing in with OS login, eg with SSO, see #Vasilij Nevlev comment in accepted answer)
_SECUREUSERNAME
SAS username (in metadata)
_METAPERSON - Specifies the person metadata name
that is associated with the
_METAUSER login variable. Not sure how this can be unknown, as SMC won't let you enter a blank value.. (anonymous web user is webanon)
_USERNAME - definitely the username as you can use this along with _password in the URL to bypass the SAS login screen.