Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
How to use the new email plugin
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
EJ Jaquet  
View profile  
 More options Nov 8, 11:11 am
From: EJ Jaquet <ejjaq...@gmail.com>
Date: Sun, 8 Nov 2009 08:11:11 -0800 (PST)
Local: Sun, Nov 8 2009 11:11 am
Subject: How to use the new email plugin
Hi all,

I am looking into the new email plugin, which sounds very usefull.

I am very interested in how to send an email with tokens with the
plugin but I can not find any documentation yet.

Anyone used this plugin, and wants to share how they have done it?

Kind regards,

Erik-Jan Jaquet


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dorioo  
View profile  
 More options Nov 9, 11:51 am
From: Dorioo <dor...@gmail.com>
Date: Mon, 9 Nov 2009 11:51:29 -0500
Local: Mon, Nov 9 2009 11:51 am
Subject: Re: [coldbox:3494] How to use the new email plugin

Are you using 3.0? If you are, you could inject the plugin where needed and
do something like below. I'm referencing it as "instance.mailSevice" because
I'm injecting it but the same can be done using getPlugin() where
applicable.

1. Get a new mail object

     <cfset var emailObject = instance.mailservice.newMail()>

2.  Configure the object's properties. You can use the config function or
setters. CFDUMP to easily see all the setters or look at
coldbox/system/beans/Mail.cfc

     <cfset emailObject.config(from     = whatever1
                                 ,username = whatever2
                                 ...)>

3. Send the email

     <cfset instance.mailservice.send(emailObject)>

PS. "coldbox/system/beans/Mail.cfc" may have type="int" references that
don't work in CF8 or CF9. Change those to type="numeric" to get it working
for now.

- Gabriel


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Majano  
View profile  
 More options Nov 9, 11:45 am
From: Luis Majano <lmaj...@gmail.com>
Date: Mon, 9 Nov 2009 08:45:00 -0800
Subject: Re: [coldbox:3494] How to use the new email plugin

Erik,

It is very simple, you can read the API to understand it.  Here is a simple
breakdown until the docs are complete:

1. get a new mail object: getPlugin("MailService").newMail();
Populate it with your mail information and then you can also set a structure
of name-value pairs as tokens:

tokens = {name="Luis Majano",time=dateformat(now(),"full")};
mail.setBodyTokens(tokens);

Once the tokens are set,the mail service will try to match them in the body
of a message and replace them. So I can do this:

mail.setBody("Hello @name@, how are you today? Today is the @time@");

As you can see, tokens are in the format of @token-name@, then the service
will replace them for you. Then just send them using the send() method.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik-Jan Jaquet  
View profile  
 More options Nov 10, 3:44 am
From: Erik-Jan Jaquet <ejjaq...@gmail.com>
Date: Tue, 10 Nov 2009 09:44:40 +0100
Local: Tues, Nov 10 2009 3:44 am
Subject: Re: [coldbox:3496] Re: How to use the new email plugin

Hi Luis, Gabriel,

Thanks for your input! It is working great now! The new Coldbox 3.0 looks
promising!

Kind regards,

Erik-Jan

2009/11/9 Luis Majano <lmaj...@gmail.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google