Some of the frequently asked questions on customization of the e-mail
message in the sendmail function, are listed below:
1. How can I insert line breaks to my
e-mail message?
A message could be sent as "Plain Text" or "HTML". Use <br> tag if the content is HTML and \n
if the content type is "plain text". For example,
on add { on success { sendmail ( To : zoho.loginuserid From : zoho.adminuserid Subject : "To insert line breaks" Message : "Dear Customer, "+ "<br>Your order has been processed" ) } }
|
2. How can I send e-mail message with form data?
You can configure to send e-mail message with form data either from the Form GUI or by adding Deluge Script with the Send mail task.
1. To configure email notifications from the Form GUI, refer the topic, Configure email notifications from GUI. The email notifications configured from the Form GUI will be displayed as a script in the Script tab.
2. To configure email notifications with form data by adding Deluge Script, use the input.formdata
variable in On Add -> On Success or On Edit -> On Success script.
Steps to add the Send mail script using Script Builder:
1. Select the Script tab.
2. Select the required Form from the Select Form list-box.
3. Select the Form action to invoke the script. For example, if you want to send mail when a record is submitted, select the form action on Add -> On Success.
4. Next, select the Deluge task that needs to be executed. To send mail, drag-n-drop the send mail task to the editor area.
5. Move mouse over the task and click on the Edit option, as shown in the screen-shot below.
6. The Send Mail screen is displayed, wherein you specify the From, To, Subject and Message.
7. To send mail with formdata, specify the message as shown in the below format selecting the Rich text tab.
8. Click Done to update the configurations to the script builder.
9. Click Save Script to save the script. Now, when a record is submitted, the configured email is sent to the specified To address with the Form data. A sample format of the email is shown below:

3. How can I send only specific field values
in the e-mail message?
To send only specific field values in your e-mail, use the input.<field_name>
variable in On Add -> On Success script. For example, you have
3 fields (Name, Age, Email), and in the email message you want to send
only the Name and E-mail field values. The format for the same will be,
on add { on success { sendmail ( To : zoho.loginuserid From : zoho.adminuserid Subject : "Order Confirmation" Message : "Name : "+input.Name+"<br>" +"Email : "+input.Email ) } }
|
Refer FAQ - Form Builder,
to configure the above from the GUI.
4. How can I
send a URL in my e-mail message?
To send a link/url in your e-mail message, the actual link must be specified
within the <a href> html tag and the actual link must be
within single quotes, as shown
in the sample below:
on add { on success { sendmail ( To : zoho.loginuserid From : zoho.adminuserid Subject : "sending links in e-mail messages" Message : "Please refer the following links : "+"<a href=' http://www.company.com/files/att1.pdf '>PDF1</a>" + " <a href=' http://www.company.com/files/att2.pdf '>PDF2</a>" ) } }
|
5. How can I send the url of the uploaded file,
in my e-mail message?
Get the url/link of the uploaded file by specifying the url within the
<a href> tag, in the following format. For example, in the
sample message given below, File_Upload_1 is the name of the file
upload field and the actual link is specified within single quotes.
on add { on success { sendmail ( To : zoho.loginuserid From : zoho.adminuserid Subject : "sending uploaded file links in email messages" Message : "<a href='http://creator.zoho.com/DownloadFile.do?filepath=/" + input.File_Upload_1 + "&sharedBy=" + zoho.adminuser + "'>Uploaded File</a>" ) } }
|
6. Can I send e-mail from Form A with url
to populate a field value in Form B?
To populate a field value in Form B by sending e-mail, you have to pass
the field value with the form url. For example, assume you have a e-mail
field named clientEmail in your current form, and you want to
send mail to this e-mail with the url of Form B and populated in with
the To address of your e-mail.
To do this, you have to specify the form url with the field name and the
value to be populated, within the <a href> tag, as given below:
on add { on success { sendmail ( To : input.clientEmail From : zoho.adminuserid Subject : "sending uploaded file links in email messages" Message : "Enter your order details in" + "<a href='http://creator.zoho.com/sampleapps/form/355/Email_1=" + input.clientEmail + "'>" + " Form B</a>" ) } }
|
In the above message,
- http://creator.zoho.com/sampleapps/form/355/ is the link to
the form, with owner name sampleapps
and 355 as the formnumber.
- Email_1 is the name of the e-mail field in the form.
- clientEmail is the name of the e-mail field in the current form,
from where the e-mail is sent on form submission.
Selecting the link in the email message will display Form B with the
Email_1 field updated with the input.clientEmail
value.
7. How can I send the url to view the current
record?
The current record can be fetched by specifying the view link within
the <a href> tag, as shown
in the format given below. The input.ID
will display the current record in the view.
on add { on success { sendmail ( To : input.clientEmail From : zoho.adminuserid Subject : "sending uploaded file links in email messages" Message : "<a href='http://creator.zoho.com/<your user id>/view/2/record/" + input.ID + "'>View this record </a>" ) } }
|
8. How can I send mail with all the values
selected in the multi-list field of my form?
Refer the topic Tips & Tricks ->
Iterating Data in Radio buttons/check-boxes.
9. How can I send
attachments to my e-mail?
Zoho Creator currently does not support attachment in e-mail messages.
As a workaround, you can use our Zoho Viewer to upload your document and send
the document link in your e-mail message.
Note: |
To execute the HTML tags,
1. Select More Actions ->
Application Settings link is displayed in the top-right corner, in Edit mode 2. Set the option 'Allow HTML Tags' to "Yes" to execute the HTML tags.
|