Powermail Email to friend - typo3

I want to create an 'Email to friend' form where the user enters an email address, and an email is sent to that address with a link to the current page url.
How do I set the receiver to be the email entered into the form?
plugin.tx_powermail.settings.setup.receiver.overwrite.email = TEXT
plugin.tx_powermail.settings.setup.receiver.overwrite.email.data = myemailfield??

.data = GP:tx_powermail_pi1|field|markername
But beware that your system can send emails to any email address that a user wants. Someone could use it for spaming with a "tipafriend" function.

Related

Send a contact us form details to email in Dart

I am making a Contact us form page in my Flutter app and would like to send the details of the form (email of the user, name and the message) to my email address when the user hits the Send button. I don't want to launch the gmail app from phone for this. Are there any other ways to this?
Thanks!
Of course, you can.
You can use the flutter_email_sender package or flutter_mailer package. Both of them are very similiar.
For example if you are using flutter_email_sender package,
final Email myFormEmail = Email(
body: 'Email body', // This could be from the form field's value
subject: 'Email subject', // Subject (maybe type of question, etc)
recipients: ['example#example.com'], // This is receiver (maybe your email)
cc: ['cc#example.com'],
bcc: ['bcc#example.com'],
attachmentPaths: ['/path/to/attachment.zip'], // Attachments
isHTML: false,
);
And then inside the 'SEND' button, add this kind of code:
await FlutterEmailSender.send(myFormEmail);
Please check "mailer" package from flutter. It will use smtp to send email from background without opening userinterface app. It has gmail, yahoo mail, mailgun options to send email.
The Reference link :
https://pub.dartlang.org/packages/mailer

How to send google script sender email to no-reply#entreprise.com?

I send 200 emails to a community of students via a google-spreadsheet attached google script.
My mailing call is as follow :
MailApp.sendEmail(
"toto#gmail.com", // targetEmail
"HELLO FROM KING OF NIGERIA", // emailTitle
"", // something
// emailContentHTML
{ htmlBody: "<b>Hello John</b><br><p>I'am king of Nigeria.<br>Got gold everywhere.<br>Need your help I'am in danger.<br>Want to share with you.<br>Could you send me 50$<br>Sinceraly, your friend.</p>"}
);
The script being run by my google account john.Doe#entreprise.com, the 200+ participants see the email as coming from me (john.Doe#entreprise.com). I understand this is fair game to limit spamming and co, but my company has a gmail entreprise.com domain name and I would like a solution so to not get dozens of "Thanks you" alerts in the following days. For sure, I do NOT want them to keep me in their following discussion.
So I look for something such as create a no-reply#entreprise.com account, and then a js thing so the script sign email with this no-reply#entreprise.com email.
Also, is there a way to programatically sign the google-script mailing from an other account of my company (no-reply#entreprise.com) ?
Note : google-script-manual
Since the script is being run under your Gmail account, the easiest way to do this is to add noReply: true to the message object. This will result in the email being sent from a generic noreply#enterprise.com email. The noreply email account does not need to be created for this to work.
Note that this does not work for personal Gmail accounts.
The documentation for this is at this link as noted in Edward Wall's answer.
MailApp.sendEmail(
"toto#gmail.com", // targetEmail
"HELLO FROM KING OF NIGERIA", // emailTitle
"", // something
// emailContentHTML
{ htmlBody: "<b>Hello John</b><br><p>I'am king of Nigeria.<br>Got gold everywhere.<br>Need your help I'am in danger.<br>Want to share with you.<br>Could you send me 50$<br>Sinceraly, your friend.</p>",
//send from generic noReply#enterprise.com address
noReply: true}
);
You could use the following method from the MailApp documentation
sendEmail (title, replyTo, subject, body)
Setting the replyTo to your do-not-reply email will mean that anyone who presses reply will send their email to your do-not-reply mailbox
MailApp.sendEmail (
"email#example.com", // targetEmail
"do-not-reply#example.com", // reply to email
...
)
Link to MailApp Documentation
The easiest way to send email from the no-reply#enterprise.com account is having the Apps Script will have to run under the authority of that account.
How you achieve this depends on how the script is being executed. If it is being executed by a Trigger, the Trigger must be created by the no-reply account.
If the script is published as a web-app, it should be deployed from the no-reply account, and set to execute as no-reply#enterprise.com.
If the script is triggered manually, it will have to be triggered by somebody logged in as the no-reply user.
A simpler option is to set a reply-to address, as shown in Edward Wall's answer.

Laravel email confirmation email sent or failed, Email preview and editable

Laravel5 Currently i am facing issue unable to check the status email is sent and not even getting email failed and i am using mandrill api for sending emails
$mail = Mail::send('emails.pendingorder', $data , function($message) use ($domain, $order)
{
if ($order->other_email) {
$message->from($domain->email, $domain->website);
$message->to($order->email, $order->name)->subject('test Email ');
$message->bcc($order->other_email, $order->name)->subject('test Email ');
}else{
$message->from($domain->email, $domain->website);
$message->to($order->email, $order->name)->subject('test Email ');
}
});
if($mail){
echo 'sent';
}else{
echo 'Fail';
}
The second thing..
i created email templates in blade and i want to preview email in ckeditor if there any any chaning or modification require then i edit the content and send email. i havn't any idea how to to this :(
Its my first try with laravel email and i am totally stuck with it
Do you have correct configuration in config/mail.php? Remember to change pretend to false. Also, Mail::send returns void, so you will have to check status on your mandrill account.
For editing email before sending it:
create form with ckeditor
fill this form with your default template
after submitting you have email body in your request, you can pass it to your email view
If you want your email to be fully editable, instead of having email view with only one variable you can use:
Mail::raw('This will be body of your email', function($message) {
// ...
});

angularjs forms delete empty objects while submitting

I have a contact Form in my App. I am adding email field dynamically when user clicks on add Email button. if user may or may not enter the value after email field generated when he clicks on add Email button.
If user not enter the value of Email and he clicks on submit, the angularjs sending data as emails[{"key":"Work","value":"user#domine.com"},{"key":"","value":""}] to server.
How to remove these type of empty objects (like {"key":"","value":""}) while submitting the form to server.
Just before send check if if email.value is "" and remove it from array there jsbin :
$scope.send = function() {
angular.forEach($scope.emails, function(email, index){
if(email.value ===""){
$scope.emails.splice(index, 1);
}
});

How to get email address in FB connect?

Can we get email address using: users.getStandardinfo?
Please help me on this.
Thank you
You can't. But you can ask the user to provide it when he/she logs in.
There is proxied_email that can be taken from user table, you can try:
$personArray = $facebook->api_client->users_getInfo( $fb_config->user_id, "last_name, first_name, birthday, hometown_location, current_location, is_app_user, proxied_email" );
$email = $personArray[0]['proxied_email'];
if(empty($email)){
echo 'Proxied email was not retreived. Trying fql query...';
$facebookFQLResultXml = $facebook->api_client->fql_query("SELECT proxied_email FROM user WHERE uid=".$fb_config->user_id);
$email = $facebookFQLResultXml['proxied_email'];
}
But I am not sure for the result
So you can get the proxied email and contact the user through it but you
can't extract the original email:
proxied_email - A proxied wrapper alternative for contacting the user through email,
instead of directly calling notifications.sendEmail. If the user shared his or her proxied
email address with you, this address also appears in the email field (see below).
http://developers.facebook.com/docs/reference/rest/users.getInfo