How to retrieve the remote Ip address for a Contact Form 7 submission? - contact-form-7

I am using Contact Form 7 to collect data and send it through the CF7 to API Plugin.
For security reasons, I receive the data via email through the [wpcf7.remote_ip] tag, which I insert in the email field as per the guide.
Screen of The Email Body:
But when I try to send the same data via API through "CF7 to API", the value is empty.
Screen of the CF7 to API setup:
Where am I wrong?
Screen of the CF7 to API log:

wpcf7.remote_ip is only valid in an email template because it is created/populated by the CF7 plugin when the notification mail is being processed. You will need to create your own hidden field on the form when the page is loaded which you can then use in your API listing,
add_filter('wpcf7_form_hidden_fields','add_hidden_ip_field');
function add_hidden_ip_field($fields){
$fields['remote_ip'] = ... //get the remote IP
return $fields;
}
NOTE: to get the request remote IP, see this answer
You can then use the field remote_ip in your API

Related

NetSuite REST Services - Company Address

I am working on external application to pull data from NetSuite using NetSuite's REST services.
Unable to find the way to pull Company Address.
Please respond if you the way.
The Company's address would be present in NetSuite's Company Information section (i.e navigate to Setup --> Company --> Company Information).
If you are using a NetSuite Restlet script to pull Company address, you need to use "N/config" module.
So using the N/config module, load the company information record:
var companyInfo = config.load({
type: config.Type.COMPANY_INFORMATION
});
// then get value of Company address
var companyAddress = companyInfo.getValue({
fieldId: 'mainaddress_text'
});
return companyAddress; // return the address in Restlet script
Hope this helps.

How to send email by simple email address using crm?

I'm working with Dynamics CRM 2016, I want to send an Email from crm using an email address that the user insert (the email Id is taken from a field in incident-Entity and not from crm-user) according to examples online the option is to use entityreference from another entity that will hold and get the Email address, is there a way not to use Entityreference but instead get my email address from a simple field on incident form?
You can use e-mail addresses that are not associated with e-mailaddress fields. It just requires a few steps.
In the UI navigate to Settings > System Settings > tab Email > header "Set Email form options".
Make sure setting "Allow messages with unresolved email recipients to be sent" is Yes.
Now you can use literal e-mail addresses like in this example:
var sender = new EntityCollection();
sender.Entities.Add(new Entity("activityparty")
{
["addressused"] = "me#home.test"
});
var recipients = new EntityCollection();
recipients.Entities.Add(new Entity("activityparty")
{
["addressused"] = "info#acme.test"
});
var eMail = new Entity("email")
{
["from"] = sender,
["to"] = recipients,
["subject"] = "Just a test",
["description"] = "Body of your e-mail"
};
organizationService.Create(eMail);
You can do it programmatically! You can send an email to a person who is not a Lead/Contact/Account.. The CRM will send email but it will show un resolved referenced when you open it in CRM
Update:
but instead get my email address from a simple field on incident form?
This is not possible in CRM UI. But possible using the code snippet from the blog link in comment. You have to query the textbox content and put in recipient party address.
(These two lines are for sending email to activity party email Id from associated record non-email field from CRM UI, without any code or customization for this particular scenario)
Unfortunately you cannot achieve it.
Only way is associated record.

Survey Monkey API: How to add email body as configured in surveymonkey UI?

I have configured my email collector to display the body in french and I sent survey invite through Survey Monkey. It worked well. Default template is used if this is not specified String in Survey Monkey API. Is there a way to get already configured email collector setup message to be sent? I want the emails to be in the language I had chosen in SM UI
The best way to create a new message based on a template right now is to copy a previous message.
To do this, you'll want to include the collector/message to use as a template when creating a new message like this:
POST /v3/collectors/{collector_id}/messages
{
"from_collector_id": "<collector_to_use_as_template>",
"from_message_id": "<message_to_use_as_template>"
}
Note that the message ID in the body needs to belong to the collector ID in the body.

TYPO3 tt_products: send a tracking email on status change to admin as well as user

I use tt_products 2.7.18 on TYPO3 6.2.25.
I configured orderEmail_to to the admins email address.
When an order is placed the customer and the admin gets a respective email - as expected.
But when I change the tracking status, only the customer gets an email.
The manual does not tell me how to configure and I'm starting to question the possibility altogether.
Can anyone tell me if and how to configure?
Thanks in advance.
plugin.tt_products {
...
orderEmail_to = admin#emaildomain.com
...
}
It is correct to set the orderEmail_to. You should check in the TypoScript Object Browser (backend module Template) that this setup is applied on your tracking page id, where in this example I have given "admin#emaildomain.com" as the admin's email address.
Only the tracking status numbers between 50 and 59 will send a notification email to the customer.
tt_products 2.7.27 is already available. Maybe your version 2.7.18 is already outdated.

Amazon SES Unsubscribe list with PHP

I have used amazon SES service for email campaigning. PHP Class that I am using can be found at http://www.orderingdisorder.com/aws/ses/.
I want to place a link in html mail that will be used to unsubscribe that user from list. I am sending mail to a list of users however, I want link to be unique for each. Link should appear as
http://www.mydomain.com/mail_unsub.php?userid=mymails#gmail.com&key=kjhgporhfs
Is there any function in SES that I can use directly??
suggestions please
You could place a special tag like #unsub# at the footer. When you loop through the mail list, you need to replace unsub tag with the current user email ( add the http://mydomain.com too of course)
When user click on that link, you need to remove them from you list. Or mark it as unsubscribe. It should be done inside mail_unsubscribe.php