Sending a the value of a variable via email

build learning interactivity

Moderator: Nav

Sending a the value of a variable via email

Postby wstolz » Tue Apr 08, 2008 10:28 am

I have created a lesson that is a compliance checklist and I've collected the users responses into a single variable, let's call it 'responses'. Can I use HTML's maito funtionality to deliver the value of 'responses' either in the subject line or body of an email?
will stolz
wstolz
 
Posts: 5
Joined: Wed Jan 16, 2008 1:28 pm
Location: Raleigh, NC

Passing data using email

Postby SB Support » Sun Apr 13, 2008 6:20 pm

Hi Will,

We have created a Flash SDK object that allows you to invoke an email client and pass data to pre-populate the To, CC, Subj and Body.

However, if your intention is to track data using email, it may be more elegant to pass the data on a URL using another SDK object that we created for this purpose.

Both these SDK objects are in beta, and will be released the week after next (4/21)
SB Support
 
Posts: 79
Joined: Tue Aug 21, 2007 4:37 pm

Re: Sending a the value of a variable via email

Postby jwafford » Thu May 01, 2008 12:20 pm

Have the updates been made to the Flash SDK that allow variable information to be sent via email?

This would be a very useful tool for some pre-course content I am currently creating. Upon completion of the content, I would like to send personal information about the learner and answers to some pre-course scenario questions to the instructors for use during in-class instruction. Being able to email that variable information would be a tremendous asset.
jwafford
 
Posts: 13
Joined: Thu Apr 24, 2008 4:47 am

Re: Sending a the value of a variable via email

Postby SB Support » Thu May 01, 2008 4:26 pm

Yes, the Email SDK object is ready for use.

Instructions:

The E-mail Object enables you to launch the learner's default email application (e.g. Outlook) and specify default values for the To, CC, BCC, Subject and Body fields. These fields can be specified in the Properties panel of the E-mail object, or, can be set using an action response method.

For example, if you wanted to send personal information about the learner and answers to some questions to an instructor, you would set the To, CC, BCC, and Subject fields in the Properties panel since this data is static. On the other hand, the body text is dynamic and depends on the learner's responses, and therefore should be set using the Action List. Here's a sample of how this might be done:

Step 1: Place an SDK object on your page and select the URL Data Object from the Shared Library > Flash SDK Objects folder.

Step 2: Set the To, CC, BCC, and Subject fields in the Properties panel

Step 3: Create an action to:
A) Store the relevant data for the body text in a text variable. Note, if you want to include more than one piece of data, you will need to use the variable's append or appendOnNewLine method to create a long string of text with the various pieces of data.
B) Set the Subject field to the above variable
C) Launch the email application

For example:
Trigger: SubmitButton.onClick
Response 1: TextVariable.append = "Student Name", InputText.getText
Response 2: E-mail object.setBodyField = TextVariable.getValue
Response 3: E-mail object.sendEmail

There is also a sample lesson that uses the E-mail object that you can use as a model. It is located in Shared Library > Examples.
Hope that helps
SB Support
 
Posts: 79
Joined: Tue Aug 21, 2007 4:37 pm

Re: Sending a the value of a variable via email

Postby SourceCoad » Wed Jun 08, 2011 2:11 pm

Is the E-mail Object compatible with Mac's default email application (Mail)? After specifying default values for the To, Subject and Body fields in my lesson and the "example lesson," the object is not sending an email to the recipient's mailbox. Will it work in the authoring environment or does it have to reside on a server somewhere in order to test?

Thank you!
SourceCoad
 
Posts: 3
Joined: Wed Jun 08, 2011 1:20 pm

Re: Sending a the value of a variable via email

Postby Nav » Wed Jun 08, 2011 3:32 pm

Hi,
The Email Object cannot, by itself, send an email. Flash cannot do this. Only a client machine, or a server-side-script can send emails.

The Email Object should launch your default web client and fill in these fields. I believe that it works similarly to an HTML mailto link. The learner still has to click send.

If you want to auto-send emails, you need to write a server-side-script that can receive information from SmartBuilder, parse it into the correct fields, and send that email. I've attached an example written in php. You can test it just using a browser. To send info from SmartBuilder to it, you'd need to use SmartBuilder's Server Communication object or URL Data object.

I can provide more information on those if you'd like.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Sending a the value of a variable via email

Postby SourceCoad » Wed Jun 08, 2011 6:50 pm

Hello Nav,

Thank you for your reply. The Email Object does not launch my default web client (I am using Mail on a Macbook). I have attempted this from both the sample lesson with SDK Email Object and a lesson I authored using the SDK Email Object. I am attempting to do this in preview mode in the SmartBuilder authoring stage.

Thank you,
Gregg
SourceCoad
 
Posts: 3
Joined: Wed Jun 08, 2011 1:20 pm

Re: Sending a the value of a variable via email

Postby Nav » Thu Jun 09, 2011 12:42 pm

Hmm, that might be a problem with your mail client configuration.

I can't paste a mailto link in here, but if you go to our contact page and click on the email address, does your email client popup?
http://www.suddenlysmart.com/contact.htm

2011-06-09_1239.png
2011-06-09_1239.png (20.52 KiB) Viewed 22211 times

-Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Sending a the value of a variable via email

Postby SourceCoad » Thu Jun 09, 2011 2:19 pm

Hello Nav,

Thank you again for your reply.

Yes, after going to your contact page and clicking on the specified the email address, Mail launches on my Macbook with "info@suddenlysmart.com" in the "To" field.

Also, when I added "<a href="mailto:html.guide@about.com">Send Email</a>" into the published "player.html" file, I could then launch my Mail application after clicking "Send email" but still could not launch my email application via the SDK object.


Thank you,
Gregg
SourceCoad
 
Posts: 3
Joined: Wed Jun 08, 2011 1:20 pm


Return to Action/Flow Chart/Variable

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Not able to open ./cache/data_global.php