Custom action button (Junk+) - email

Is it possible to create custom action button? ["Junk" button with more complex action]
I would like to:
mark the message as junk
copy the message to special folder common to all email accounts
move the message to per account junk folder
AFAIK Current junk button can deliver 1 and 3 without 2.
I need it for custom reporting to external services e.g. spamcop, knujon and other.
If thunderbird can not deliver such functionality then I am willing to accept suggestion of other Linux email clients capable to deliver such functionality.

Obviously this is easy to do with a custom XUL add-on and some basic Thunderbird chrome scripting.
This can also be done with the Custom Buttons Add-on for Thunderbird. Here is the code for the button, you will need to replace with your own folder URI's. The URI's for the folders can be accessed from the right-click content menu Properties .
/* Code */
// 1. mark the message as junk
goDoCommand("cmd_markAsJunk");
// 2. copy the message to special folder common to all email accounts
var copyUri = "imap://{user}#{host}/{path}/{folder}";
var copyFolder = GetMsgFolderFromUri(copyUri);
MsgCopyMessage(copyFolder);
// 3. move the message to per account junk folder
var moveUri = "mailbox://{user}#Local%20Folders/{spam folder}";
var moveFolder = GetMsgFolderFromUri(moveUri);
MsgMoveMessage(moveFolder);
The button script definitions are stored in the file:
{thunderbird profile}/custombuttons/buttonsoverlay.xul
You may be able to update this file automatically to ease deployment.
WARNING: Thunderbird 31 requires different code.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1043819

Related

Is it possible, in NetSuite, to workflow a button to create a new email with no set recipient

currently we have a custom record with a list/record field that links to an opportunity and i can create a button that creates new emails (via workflow) pulling recipient information from the contact on the opportunity record but what i want to know is if there is a way to replicate the "New Email" button usually found on a record's Mail Merge tab as i want to be able to press a button to open an email template that has no recipient set as currently the send email workflow option has both recipient and sender as mandatory fields - is this possible?
You can edit the Custom Record Type to check the 'Enable Mail Merge' checkbox, then you should have this functionality.
If you want the functionality to be available via a button in the main button group, I don't believe this is possible using a workflow only; however you can achieve this with scripting. To do this, create a User Event script with a Before Load function to add the button to the form, and a Client Script which can be called on clicking the button. Upload and deploy to the Custom Record Type that you want the email button to appear on. For this answer I'll assume you have at least a basic knowledge of creating a script record - let me know if you need more information.
The User Event script:
function emailButton(type, form)
{
//add a custom button on the form
//specify the function name of the Client script created in Step 2
form.addButton('custpage_Add', 'Start Email','startEmail();');
//set the internal id of the Client script created in Step 2
form.setScript('customscript_ppcs_start_email_client');
}
The Client script:
function startEmail() {
new_message([['transaction',document.forms['main_form'].elements['id'].value],['entity',document.forms['main_form'].elements['companyid'].value],['template',['66']]], 'EMAIL');
}
You can modify the template used by replacing the '66' with the internal ID of the template you want, or you can remove it. You can also remove the 'entity' as you don't want the recipient to be set. Below is an example with both removed:
function startEmail() {
new_message([['transaction',document.forms['main_form'].elements['id'].value]], 'EMAIL');
}

Customizing password reset mail View in Laravel

How can I change what appears in the password reset email in laravel?
Like addressing the user with his name and show the password reset link etc.
Where is that email view located?
In Laravel 5.3 they changed the entire password reset code, so the given answer doesn't work anymore.
If you want to change the basic texts you should copy vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php to some place in your own app (e.g. app/Notifications/ResetPassword.php), set the correct namespace and alter the texts as you wish. (don't alter the original ResetPassword.php since it's bad practice to alter files in the vendor folder!)
Then add a sendPasswordResetNotification method to the User class and make sure to reference to the appropriate ResetPassword class:
use App\Notifications\ResetPassword;
...
public function sendPasswordResetNotification($token) {
$this->notify(new ResetPassword($token));
}
If you want to change the rest of the mail template (which is used for all other mails as well) do the following:
Run php artisan vendor:publish
This will copy some blades from the vendor folder to the resources/views/vendor
The resources/views/vendor/notifications/email.blade.php is the one you want to change.
Hope this helps for people who got stuck in Laravel 5.3
Yes you can change the email template, which is located at
resources/views/emails/password.blade.php.
For customization pass an instance of User model to this view and echo out user name there like:
Hello, {{$user->username}}
//And Body of Reset link goes here
Update for laravel 5.3+
In updated laravel versions the code structure is revamped.
Password reset mail is now at vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
and its corresponding template is at:
resources/views/vendor/notifications/email.blade.php
So in order to customize it, you may need to:
Copy it to somewhere in your app's directory.
Set the proper namespace to refer to it.
Add a new method to User class & reference it to newly copied class
Customize.

Clickable format to email links in lotus notes

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.

Magento translation email - email titles

How do you go about changing the title of emails in a second language store view. Example "New Order" in the New Order confirmation email. csv files are not responding in this case...
Another solution. You can copy the default email templates into a language folder you are wanting to use, and translate them manually.
Copy everything in app/locale/en_US/template to app/locale/[YOUR
LANGUAGE CODE]/template.
Change [YOUR LANGUAGE CODE] to the Language Code of your
desired language. YOu can find a list here. Make sure it's in
the format en_US.
Modify the email templates in your app/locale/[YOUR
LANGUAGE CODE]/template folder.
In Magento, go to System > Configuration > General. At the top left, change your Current Configuration Scope: to the store you want translated.
Change the Locale to the language you translated to. It must match correct the language code used in your folder namespace.
NOTE: When editing the email template files, you'll notice some comments at the top containing variables and such. You will see something like <!--#subject Welcome, {{var customer.name}}! #-->. Changing this will alter the subject line used by Magento.
You can just create custom Transactional Emails which include the translations needed for the store view.
Create a new Transaction Email template, in your store's required
language. Go to System > Transactional Emails and click Add New
Template. Load in the default template you are trying to
translate and modify the subject and body of the email.
Go to System > Configuration > Sales Emails At the top left of your configuration, change to your desired Store View you want these emails to be assigned to.
Change the New Order Confirmation Template to the Transaction Email template you created. Click Save Config.
Items ordered from that store should now send an email using the translated email you created.

Drupal email users

I'm using Drupal 6.16: When a user creates an account on my site I have them select a category (ie children, youth, adult, etc). This is done with the select list box using the content_profile module. I have a content type that posts an announcement. In this content type is a check box that says 'email group'. Right now it does nothing, but what I would like for it to do is e-mail all the users that are associated with the group they chose when signing up for their account. If this will require extra code please be specific as I am not a strong php programmer.
Thanks for the help!!
msindle
There might be some module that do it exactly, but I don't think so.
I would have done it using few building blocks:
Retrieve the list of emails using Views - define a view that gives you the addresses according to a given group argument.
Use Rules module that will send an email notification after node is created.
Combine the two (this is the hard part) - insert the values from the view as the recipients for the email. You might be able to do it using PHP inside the Rule definition, plus view execution.
Try to accomplish it, and if you get into troubles, you are welcome to contact me via shushu.i#gmail.com
I would try http://drupal.org/project/subscriptions module + http://drupal.org/project/messaging module. You can set preferences for automatic subscribing to content type. Maybe Rules module can subscribe users automatically after creating or updating content_profile. Or maybe Rules can flag users after creating or updating content_profile and Subscription module could autosubscribe flagged users.