Rails: Specify email account that mail_to will open - ruby-on-rails

I'm relatively new to Rails and would like to place a button on the admin-only part of my website that will open my company gmail account with the addresses of all of the registered users pre-populated in the 'bcc' field.
I almost have the mail_to helper working for this purpose except the mail_to link opens my personal gmail account instead of my company account.
Is there a way to use rails to trigger the log in to a specific gmail account and to pre-populate the "to" field as well?

I think, the link opens your personal gmail account just because you have it open in another browser window or tab.
AFAIK, Gmail does not allow to open different accounts in different windows at the same time. (Probably I miss something.)
Therefore, to make link open your corp account regardless of everything, the link handler should forcibly log out the current Gmail session and start a new one.
I don't think that you really want this behaviour (I mean closing the current session in such a rude way).

Related

Is there a different validation process for "to add Logos for Non-Gmail Accounts"?

I received from Google the following instructions to add Logos for Non-Gmail Accounts:
These instructions explain how to add a logo, or avatar, to a non-Gmail email address, for example mailer#mycompany.com. Once added, all emails from that account will show logos on all three Gmail clients: Android, iOS, Desktop
In a new incognito window, visit
https://accounts.google.com/SignUpWithoutGmail
Create a new account using the non-Gmail email address. You will be
required to enter a passcode sent to this address, so be sure you
have access to read this address's email.
Once you're logged in to the new account, visit
https://myaccount.google.com/personal-info and click on "Photo" to
change your profile picture.
You'll immediately see the new logo on desktop Gmail, including on
email already sent. Android and iOS clients will take 24 hours to
start displaying it. You can change the logo whenever you wish, but
again it will take 24 hours to update on mobile clients.
I can't follow this instructions because the sender email address of our email marketing communications only exists as a sender for our email marketing tool (SFMC = Salesforce Marketing Cloud). It means that we don't have and inbox associated to it, so we won't be able to retrieve the passcode mentioned on the step 2 above.
NOTE: I can't configure the domain in order to have an inbox because it will break our email marketing platform configuration.
Is there any other way to validate that I am the owner of the subdomain (instead of receiving a passcode)? Maybe adding some TXT record to the DNS?
As far as I am aware this is the only way to add the sender image in Gmail, since this is the only way to run through the verification.
Can you explain a bit more why adding an inbox would break your Marketing Cloud configuration?
Alternative your alternative is to use BIMI record, it`s valid for the many of ESP including Gmail: https://www.emailonacid.com/blog/article/email-marketing/bimi/

Connecting visitors in different browsers

We are tracking a forgot password workflow action using adobe site catalyst. The flow happens something like below
User requests for forgot password
He provides the email address and clicks on create new password
New password generation like is send to his email address
User clicks on this link and generates a new password
First 3 actions occurs in the same browser. The 4th activity can occur in the same browser or a different browser. Because of this, site catalyst considers that user as a different one (different visitor ID) and considers that as a totally different visit. Ideally the number of users who completes activity 4 should be less than that completes 1,2,3.
But for us, we are seeing more users who completes activity 4 which could be because of this different visitor issue.
Can someone please suggest a better approach to solve this?
You might want to try overwriting the Visitor ID.
I do not know how your site works in the backend, but generally, and theoretically (as I have yet to be asked by clients on to implement this):
Extract the Visitor ID when the user provides the email address and clicks on create new password. You might want to check the appendVisitorIDsTo (Cross-Domain Tracking) function out and see how the Visitor ID query parameter is implemented.
Send the Visitor ID along with the email address to your backend controller that spits out the template forget password email.
In the template forget password email, append the extracted Visitor ID as a query parameter in the reset link.
In DTM (if you are using DTM), modify your Marketing Cloud Visitor Service tool enable this configuration: overwriteCrossDomainMCIDAndAID.
When the user clicks on this reset link, the Visitor ID should be the one that is initially created for the user.
You might want to read this answer as well.

URL in Gmail Alias

At our company, we are working with several aliases. The current situation is that one team of 10 has two aliases. In SalesForce, they would like to put the link to specific emails so that anybody out of the team can open an e-mail related to a claim for instance.
In the e-mail's link, there's the "/u/0" part that identifies the mail gmail account (firstname.lastname#...), but it seems that the aliases have a different number for everybody.
So to be clear when they open the same mail in the shared alias, the e-mail ID stays the same in the URL (logic) but the digit after the "/u/" changes for everybody.
Is there a way to generate a URL that will open the e-mail independently of the person that clicks on the URL ?
Edit:
I'll try to be clearer. Our Customer Service Center employees all have two e-mail adresses: an individual one, and a delegated one. Customers will send e-mails to the delegated one (accessible by all employees). So what we would like to do is copy the link of the e-mail into SalesForce so that any employee (who has access to the delegated gmail) can check the e-mail. But, as explained above, as the individual gmail adress is always identified by a "0" after the "/u/" chain in the URL:
https://mail.google.com/mail/u/0/#inbox/156b821f776b6d4a
the delegated gmail adress is identified by a number that differs depending on the person. So employee A will have "/u/144/" as link to the delegated gmail, another employee will have "u/345/ as link to the delegated gmail. This makes it impossible to access the e-mail by clicking the link...
Hope this little case-study makes the issue clearer.
Thanks in advance
Julien
I'm trying to do this too.
I think the only way (outside of paying for the Google business email system) is to have a database of user IDs that link to each user's gmail delegate URL.
I have a system that allows about 6 or 7 users to login, however they all share the login details (it's a small website, with no important information stored). I will have to force them all to have separate login details, and then have a lookup for their gmail delegate URL.
If you have a lot of staff, then you'd have to get their buy-in. Maybe send a global email around that links to a simple web form, that takes them through how to enter their delegate URL. Then store this in a database, with their own personal email (the other gmail account). You should make the form validation strict, so no garbage gets entered. For users who get stuck (fail validation for entering a valid gmail delegate URL), ask them to email support. 95% of staff should be able to handle this. The other 5% would just be an exercise in patience, in getting the rest of the data.

Rails: making an email pop-up box

I need the functionality to allow a user to send an email to another user. It would be ideal if they get a gmail pop-up with the user's email pre-filled. However, I'm unsure how I to approach this feature.
1) Is this possible?
2) If it is. How would I go about it?
Well, assuming they have (and are signed into) Gmail, and have setup their machine to open mailto links with Gmail, just a mailto:some.guy#gmail.com link would do. You could also specify a subject by appending ?subject=This+is+a+test to the end of the mailto link.
<a href='mailto:some.guy#gmail.com?subject=This+is+a+test'>Email Some Guy</a>

MyOpenId not sharing email address

I'm trying to use MyOpenID for my sign-in, but it doesn't seem to be sharing the email address.
If I use Google or others I do seem to get the email address, though. I thought that this was a standard field to return.
I even see some documentation here that seems to suggest they would share email:
https://rpxnow.com/docs/providers
(I'm using Ruby on Rails and Janrain for this project)
One interesting thing is that if I setup an identity page on MyOpenId, then the email IS shared with my application. I thought that there was supposed to be a way when logging in with MyOpenID to specify what data is shared during "SimpleRegistration"?
The problem was that I was testing with my own MyOpenId account and the very first time I logged in to my development server I had not paid enough attention.
When logging in the first time it said something along the lines of "blah site is asking you to share information with it. Click here to use an existing persona or to create a new one. I didn't select one and it defaulted to "don't ask again".
I was able to fix this by going in to MyOpenId and revoking permission for my site. Then the next time I logged in it asked me again and it worked.

Resources