Is it possible to send an email with CFMAIL and have the recipient's email client display the "From" field as a full name (i.e., John Doe or Jane Smith Consulting) rather than just an email address?
The CF11 documentation for the From parameter in CFMAIL says
This attribute does not have to be a valid Internet address; it can be any text string without white spaces.
And when I tried including a space, only the first word appeared in the From field, at least in Outlook and on an iPhone.
Thanks very much for any advice.
Try it like this. Only the 'Jame Smith Consulting' part will show up for the recipient.
<CFMAIL
FROM="Jane Smith Consulting <info#jsconsulting.com>"
TO="???"
>
Yes. It is possible to add sender/recipient names along with the email address.
i.e; For from attribute, the first value "John Doe" as the name to display and will use the value in between the "<" and ">" as the user's email address.
<cfmail to="John Doe Consulting<johnconsulting#xxxxxxxxx.com>"
from="John Doe<john#xxxxxxxxx.com>"
subject="Subject">
Body
</cfmail>
But when we try the below code with only name (from attribute) instead of both name and email,
<cfmail to="John Doe Consulting<johnconsulting#xxxxxxxxx.com>"
from="John Doe"
subject="Subject">
Body
</cfmail>
it will display like below as the email is empty for this case!.
John Doe <>
Please check bennadel's post for more information
Put the name in double quotes. Like so:
<cfmail to='"John Doe Consulting" <johnconsulting#xxxxxxxxx.com>'
from='"Jane Doe Consulting" <janeconsulting#xxxxxxxxx.com>'
subject="Subject">
Related
I am creating a form using contactform7. I have to dynamically change the recipient depending on the "country" selected from the drop-down list. I have successfully done that by:
[select* Recipient placeholder "Country" "China|sidraaleem1234#gmail.com" "Belgium|sidraaleem#alumni.sjtu.edu.cn" "Canada|sidra.aleem#emcc-China.com"]
Now, I want to send the country selected from the drop-down list to the email recipient. I have added [recipient] field in the message body under the mail tab of contactform7.
However, in the email, I get the respective email id of the chosen country from the drop-down as visible in the attached image. Though in drop-down I only added country names, not the email ids.
screenshot
Can someone help me to send the only country names to the receiver and not the email id?
To get the value after pipe character, put the usual mail tag corresponding to the form tag ([your-recipient] in the case of the above example) in the Mail templates. To get value before pipe, you can use [raw{field name}] ([_raw_your-recipient]
This is completely explained in the Contact Form 7 Documentation
In your case, it's [_raw_Recipient]
I would like to create an application that allow users to add user-readable text in word document and at the back end maintain complex text (syntax) like MergeField or Velocity code.
e.g. Simple text: Hello Mr. Bob. Complex syntax: Hello «#if($gender == 'Male' Mr. #{else} Ms. #end» Bob
Is this achievable to maintain both simple text view and complex syntax view in single word document?
Thanks
First, you can't have dot in variable name, so let's assume it's saved in $gendervariable.
Second, you can have complex syntax with default of "Hello Mr. Bob" if no gender variable:
Hello #if( $gender == "Female" ) Ms.#{else} Mr.#end Bob
Notice that Mr. is the default text
On Myob Advanced (Acumatica), we would like to add a salespersons email address to the Salespersons page (AR205000). This is so that we can then add this field to the Sales Order email template, allowing us to CC the salesperson in every time their customer places an order.
Ive tried to implement this extra field, "Salespersons Email Address"; but I am having some issues.
It will only allow me to save 25 characters within the text box? How come I'm unable to add more than 25 characters?
Email fields that come with the software all have the code of px:PXMailEdit. However, i cant seem to be able to create a MailEdit field, only a px:PXTextEdit field? Why is this?
Thanks for your help. If this doesnt make sense or you need further info LMK.
Currently, Layout Editor does not support PXMailEdit control. Please find below the steps to add a custom email field on the Salespersons screen:
For the SalesPerson DAC, ceate a new field of the string type with length set to 255 (this is the length defined in the PXDBEmailAttribute used on all email fields in Acumatica/MYOB Advanced):
Replace generated attributes with the attributes below, save your changes and publish customization:
[PXDBEmail]
[PXUIField(DisplayName="Email Address")]
Open the Salespersons screen in Layout Editor and add TextEdit control for the custom field declared on step 1, then save your changes:
Select Edit Project Items from the File menu and change control type from PX.Web.UI.PXTextEdit to PX.Web.UI.PXMailEdit in the XML changeset generated for the Salespersons screen, save your changes and publish customization one more time:
This is how custom email field should look like on the Salespersons screen after you complete the steps above:
Using Salesperson's email in Automation Notifications:
If you set up custom Email Address field from the Salespersons screen as CC address in Sales Order notification:
the system will automatically include Email Address from the Default Salesperson in notification message:
Using Salesperson's email in Notification Templates:
This might seem a litle confusing, but the Sales Person node available for selection on the Notification Templates screen represents an Employee linked with a Salesperson (see screenshot below for details):
With SalesOrderNotification's CC field set to ((SalesPerson.SalesPersonID.UsrEmailAddress)), the system should automatically include Email Address from the Default Salesperson in the generated email:
I want to add a line to my MailApp.sendEmail code where I cc emails from two different reference columns in a google sheet document. Is there a way to do this?
In addition, I want to be able to reference a column to bcc on my email, but not all of the cells are filled. Is there a way to to reference the column and have it ignore the blank cells to send out the email with only the bcc people I have listed in my column?
Finally, is it possible to put multiple emails in the same cell and not freak out the script? When I currently do this, I get an error saying, "someone#gmail.com; anothersomeone#gmail.com is not a valid email."
Here is the code I have now:
MailApp.sendEmail({
to: values[i][1],
cc: values[i][2],
// how do I reference multiple columns (2 and 3) here???
bcc: values[i][3],
//how do I get the code to ignore blank cells & is there a code so I put multiple emails in a cell in column 4
subject: "Weekly math grade update for " + values[i][0],
htmlBody: body,
});
Came across the following during a project:
Customer fills out his/her name during checkout: Firstname Middlename Lastname
The confirmation email sent contains incomplete name in the form of "Firstname Lastname" on the first sentence of the confirmation
I looked at the mail templates and the function order.getCustomerName() does not seem to retrieve all the information.
You can set this in the customer address settings of admin.
Admin → System → configuration → Customer Configuration → Name and Address Options → Show Middle Name (initial).
Showing more than the initial in the templates is something you will have to investigate further. In the UK we keep the form simple and don't ask middle names.