Clickable format to email links in lotus notes - email

I am working on an application with xpages.I would like to send emails with that contain links.
When I send the link, it does not appear in clickable format.Can someone help me to have clickable format?
Thank you
var db = session.getCurrentDatabase();
var memo = db.createDocument();
memo.appendItemValue("Body","http://www.my_link.com");
memo.appendItemValue("Form", "Memo");
memo.appendItemValue("Subject", "New task !");
var t = mail.getValue();
memo.send(t);

If you do it like this, the "Body"- Item is a simple Text- Item and not a Richtext- Item. Text- Items cannot contain clickable links.
You have to explicitly define Body as a NotesRichtextItem and append text to it:
var rtitem:NotesRichTextItem = memo.createRichTextItem("Body");
rtitem.appendText("http://www.my_link.com");
rtitem.addNewLine();
This way the link will automatically be converted to a clickable hotspot.

If you are hoping that the statement memo.appendItemValue("Body","http://www.my_link.com"); will create a rich text field with link then it won't. For that use NotesRichTextItem class. You could also look into this Technote on how to create HTML formatted mail messages.
One question here, where will the recipient would be viewing this mail? In Notes client or this mail would be sent to IDs like Gmail or Yahoo? If recipient would be viewing this mail in Lotus Notes then you would have to enable this setting in your Notes client.
Go to File > Preferences > Basic Notes Client Configuration. Under the section Additional options enable the setting Make Internet URLs (http://.......) into Hotspots.
If the mail is being sent to IDs like Gmail or Yahoo then you would be at their mercy on how links are displayed. But in my experience they always display links, if they are in valid format.

Related

PowerApps Modify Email-Screen Template

Hi I have a PowerApp connected to Sharepoint List. The sharepoint list has 2 to columns that are lookup values of peson/group. Please see screenshot of powerapp display screen below.
As I noted on the screenshot, I want have a button to send email. When the button is clicked, the email-screen template by PowerApps (Link) appears.
How do I autopopulate the Sponsor and BackUp Sponsor fields to the Email-Template, while still allowing the user to add more people if necessary?
I am not sure if this is needed but 
I don't think you will be able to add the people into that control, but you could create a label that shows the people from your form above the "To" field in the email form and let the user enter additional recipients into the To field.
The icon that triggers the sending of the mail has underlying code in the OnSelect property. The first command in there sets the variable _emailRecipientString by concatenating several strings.
Set( _emailRecipientString, Concat(MyPeople, Mail & ";") );
Add your list of people as parameters inside the Concat() function.
I also posted the answer here
here is the answer:
Add the code to the Notify/Send Email in the Display Screen
ClearCollect(selecteduser,
ForAll(DataCardValue1.SelectedItems,Office365Users.SearchUser({searchTerm:Email})),
ForAll(DataCardValue2.SelectedItems,Office365Users.SearchUser({searchTerm:Email}))
);
Clear(MyPeople); ForAll(selecteduser,Collect(MyPeople,Value))
I hope this helps someone else

Outlook Show Email Images to User

I'm trying to send mails to some users which are basically built over images. How can I get those images to download by default in the users' (outlook) mailbox?
I did try encoding the image in base64 and sending it, not as a hosted image but embedded in email-html. But that too, did not work :( (I was SO sure that it would)
The client (organization) is well aware of this (that we'll be exchanging mails). Is there any setting that can be tweaked in the admin panel of MSExchange or o365 which can allow this?
Users have to have that set in their preferences. You cannot make it automatically do it as an email sender due to SPAM senders and security reasons.
Outlook allows adding hidden attachments, you may refer mention they in the message body (embedded images). In the message body you may see the following tags:
<img src="cid:some-image-cid" alt="img" />
The "cid:" prefix means that name refers to the attached image with the specified content ID.
Attachment attachment = newMail.Attachments.Add(
#"E:\Pictures\image001.jpg",
OlAttachmentType.olEmbeddeditem, null, "Some image display name");
string imageCid = "image001.jpg#123";
attachment.PropertyAccessor.SetProperty(
"http://schemas.microsoft.com/mapi/proptag/0x3712001E", imageCid);
String.Format("<body><img src=\"cid:{0}\"></body>", imageCid);

SendGrid Transactional Templates - Address and Unsubscribe Link Broken

I've configured several Transactional Templates to be sent from my SendGrid account via their handy Design Tool, which work great!.
However the Address Line and Unsubscribe links on the template footer aren't activated. In an email they display as placeholders, like so
[Sender_Name]
[Sender_Address], [Sender_City], [Sender_State]
[Sender_Zip]
Unsubscribe << (Not a Hyperlink)
I've followed SendGrid's documentation and configured my account address but am unable to find the solution for this.
Any ideas on this? Thanks for any input or guidance!
To get the unsubscribe to function you will need to create one or more unsubscribe groups. If you look under the Marketing menu you will see the sub menu to create those. Once you create one it will be assigned an ID number. When you are generating your email you will need to pass that ID value in as part of the EmailMessage object. If you are using V3 of the API you will be looking for SetAsm.
As for the Sender fields, for transactional templates they do not work correctly, as they are meant for marketing campaigns. Your two options are:
Remove the Sender fields from that block in the template. Add a new text block above it with static values.
Download the template into HTML and convert the sender objects into substitution variables. You will then be able to set them in your code when you are creating the email.
GitHub Bug
The unsubscribe link will only appear if you create an unsubscribe group and specify it while sending using
asm: {
group_id: <the unsubscribe group ID>
}

Is it possible to hack mailto?

Sorry about the provocative subject but I could not think of a better word than "hack" to describe what I would like to do!
On my site, I provide links to other sites and on request by the user, display a page from the site in a frame or pop up window. Frequently these displayed pages have a mailto-tag.
I have found it extremely annoying that clicking the mailto link starts off my outlook which I no longer use but retain it as an installed program on my machine.
What I would like to do is:
1) Pick up the subject and email address part of the mailto tag.
2) Pop up an HTML form where the email address and the subject is prefilled.
3) Send the email message through my site's mailserver instead of through outlook or any other mail client.
Is there a way to do this?
Thank you in advance - and once again apologies for the provocative subject line!
Cheers!
Uttam
Try it using javascript.
With using a framework like jQuery its easy so find such tags inside a frame or popup window.
You can try it by something like this:
var allATags = $('myFrameId').find('a');
$(allATags).each(function(index, element){
var href = $(element).attr('href');
//here you shall try to find out if there a mailto Link or a normal link, e.g. using regular expression or indexOf()
[...]
if (isMailToLink){
//split the href String at the signs '&' with which the subject, mail, etc is splitted and removing the mailto, putting all in own variables
[...]
$(element).attr('href', 'javascript:void(0);');
$(element).click(function(){
showMyMailForm(toMail, mailSubject, mailBody);
});
}
});
On opening a document in a frame or a popup wait for the document being loaded and then run your code to replace all existing mailto-links on that document with your mailform-mailer.
The code is just a way trying to inspire, no working code.
Users can set their default email client, here are a couple of links that may be helpful:
Firefox
Chrome
Internet Explorer
Of course this is controlled by the user, so it will help you personally, but not force others to use a specific program.
You could easily pass url parameters onto your contact landing page/email form instead of a mailto link, something like a href="http://landingpage.com/index.php?email=you#you.com&subject=hello" could be used to pre-fill generic contact/email form fields.

Amazon SES Unsubscribe list with PHP

I have used amazon SES service for email campaigning. PHP Class that I am using can be found at http://www.orderingdisorder.com/aws/ses/.
I want to place a link in html mail that will be used to unsubscribe that user from list. I am sending mail to a list of users however, I want link to be unique for each. Link should appear as
http://www.mydomain.com/mail_unsub.php?userid=mymails#gmail.com&key=kjhgporhfs
Is there any function in SES that I can use directly??
suggestions please
You could place a special tag like #unsub# at the footer. When you loop through the mail list, you need to replace unsub tag with the current user email ( add the http://mydomain.com too of course)
When user click on that link, you need to remove them from you list. Or mark it as unsubscribe. It should be done inside mail_unsubscribe.php