Menu
  • HOME
  • TAGS

How do I send an email of the current page using a button?

javascript,php,html,email,xampp

I figured it out using php and installing XAMPP. I used apache, mysql, and mercury in XAMPP. I followed the steps for mercury here. I also had to change some things in the php.ini file and sendmail.ini file. Those steps can be found here. Hope this helps cut down the...

How to attach several files in mail using unix command?

mysql,email,ubuntu,sendmail,ubuntu-14.04

You are very close. You can use mail command to send 1 attachment as follow (you'd better TAR / ZIP your files before sending): echo "$2" | mail -s "$1" -a /path/to/file.tar.gz [email protected] Next, if you want to have more features, you can use mutt (install with apt-get install mutt):...

Mail with html content shows break lines or ignores newlines

email,templates,go,mandrill

Are you sending the mail as HTML? If so, you can wrap everything in the <pre> tag. If you're not using HTML, setting this header should help: Mime-Type: text/plain Also, try changing your newlines from \n to \r\n. ...

Process ALL incoming e-mails with PHP script [closed]

php,email,inbound,email-processing

You should be able to alias @sub.domain.com into one mailbox, and the From: header of the email will contain username. You would need to either keep the script running or run the script in a cron job. An e-mail arriving couldn't trigger the script to run without introducing extra,...

Open mail in python

python,email

The result of retr() is a tuple (response, ['line', ...], octets) of which you are keeping the list of lines. In the example given at the end of python doc they show for j in M.retr(i+1)[1]: print j which you have converted to for msg in Mailbox.retr(i+1)[1]: file.write(msg) The difference...

PHP Contact Form returning Error Message [duplicate]

php,html,forms,email,contact

Your code construct is correct, and the return value (which is your custom error) might be correct "if" the mail function is failing. A lot of time we find php mail() function is not working. In some cases, the email is not sent even the function returns true. Following are...

How do you unblock the 993 port if your firewall settings is blocking it?

php,email,ssl

You can find the answer here which is already asked on Stackoverflow. Make sure that the mailbox you are trying to connect is IMAP. PS. It doesn't look like firewall issue to me...

Gmail API: Get list of messages labelled with a specific label in php

php,email,gmail,google-api-php-client,gmail-api

Are you asking how to filter a list of messages by labelid? $opt_param = array['labelIds'] = 'Label_143'; $messagesResponse = $service->users_messages->listUsersMessages($userId, $opt_param); ...

fopen multiple files to send mail with mail() php

php,email,send,multiple-files

I've noted you have lost a boundary before each attachment. // FILES HEADERS $headers .= "--".$num."\r\n"; // Boundary $headers .= "Content-Type:application/octet-stream "; $headers .= "name=\"".$_name."\"r\n"; $headers .= "Content-Transfer-Encoding: base64\r\n"; $headers .= "Content-Disposition: attachment; "; $headers .= "filename=\"".$_name."\"\r\n\n"; $headers .= $file."\r\n"; The closing boundary (ended with "--") should be placed outside...

Launching email client programatically in android and passing email address to client

android,email,android-intent

You have to add an extra flag to close the email app first. Something with singletask or so. Try something like: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); And have a look at yet more flags. ...

javax.mail.MessagingException: [duplicate]

java,email,javamail

You have forget two steps: Your password The Authenticator Also, maybe you didn't have any local mail server who listen the port 25 on your localhost (javax.mail.MessagingException). Here I use the port 587. So try this code: import java.util.Properties; import javax.mail.Authenticator; import javax.mail.Message; import javax.mail.PasswordAuthentication; import javax.mail.SendFailedException; import javax.mail.Session; import...

Send email with body consisting of objects

email,powershell,foreach

Also if you want it to look more nice and readable you can do something like this that will spit it out in a table: $body += "<body><table width=""560"" border=""1""><tr>" $bodyArray[0] | ForEach-Object { foreach ($property in $_.PSObject.Properties){$body += "<td>$($property.name)</td>"} } $body += "</tr><tr>" $bodyArray | ForEach-Object { foreach ($property...

How to send automatic mail from java Servlet using gmail id?

java,email,servlets

check out the spam folder as well and it might take a minute or 2 to get there in your inbox. I wrote a blog post on sending email via java. You may look it for the reference http://javadocx.blogspot.com/2013/06/sending-email-with-java.html...

Limit cron from sending a mail for 5 mins in linux/shell

linux,shell,email,cron

Try this: sentMailLock=/var/cache/myapp/sentMail.lock sendMail=false if [ ! -e "$sentMailLock" ] then sendMail=true else old=$(find "$sentMailLock" -mmin +10) if [ -n "$old" ] then sendMail=true fi fi if $sendMail then ... send_mail "$emailSubject" "$emailBody" touch "$sentMailLock" fi ...

How to exclude guest users from getting emailed Rails 4 Devise

ruby-on-rails,email,ruby-on-rails-4,devise,mailer

def welcome_email(user) # The following line is unnecessary. Normally, you do # something like this when you want to make a variable # available to a view #@user = user # You can make the if more explicit by writing # if user.id == nil, but if will return false...

SMTP Sendmail With PEAR not using formating from database

php,mysql,email

if you want HTML email then you need to add the header: 'Content-type' => 'text/html;charset=iso-8859-1' your charset may vary...

Sending mail by Unauthorised sender in Google AppEngine

python,google-app-engine,email,sendmail

From https://cloud.google.com/appengine/docs/python/mail/emailmessagefields sender The email address of the sender, the From address. The sender address must be one of the following types: The address of a registered administrator for the application. You can add administrators to an application using the Administration Console. The address of the user for the current...

Rails 4.2.1 Action mailer not delivering the emails

ruby-on-rails,ruby,email,sendmail,actionmailer

Try this config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :user_name => "your mail", :password => "your password", :authentication => :plain, :enable_starttls_auto => true } ...

Emails sent from a cronjob to a local mailbox

email,crontab,sendmail

Using an alias is one soluton, another is to add a line before the cronjobs you want to send email somewhere else saying: MAILTO=localuseryouwantemailtogoto Check out man 5 crontab for the full details....

Change the displayname of the sender when sending mail via o365?

email,office365

According to the reference documentation for the Message object, what you want to do is possible. However, logic tells me that shouldn't be possible, and furthermore, the testing I did showed me it wasn't possible (or isn't working). I will follow up on this and update this answer when I...

PHP - how to send e-mail after successful file upload? [duplicate]

php,email,file-upload

Just to be a little more complete: You are missing a so called String Operator ('.') between your two strings: $headers = "Gallery" "\r\n" . 'Content-Type: text/plain; charset=UTF-8'; Should be $headers = "Gallery" . "\r\n" . 'Content-Type: text/plain; charset=UTF-8'; Or $headers = "Gallery\r\n" . 'Content-Type: text/plain; charset=UTF-8'; ...

PHP email not echoing a foreach loop

php,email,foreach

You need to replace below line into your foreach loop echo '<p>'.$prdqty.' - '.$prdsize.' - '.$prdname.'</p><br><br>'; with $message .= '<p>'.$prdqty.' - '.$prdsize.' - '.$prdname.'</p><br><br>'; ...

Java String Parser to find string, save it and print it

java,email,parsing,set

When you do System.out.println(s); you're basically calling s.toString(). However, since s is of type MyTag and MyTag doesn't implement toString() on its' own, it calls the super. Each object in Java is derived from Object. Object's toString() prints this "gibberish" which is basically the name of the object and the...

Attaching .mov to MFMailComposeViewController

ios,objective-c,email,email-attachments,mfmailcomposeviewcontroll

You aren't getting the data for the file correctly. The first step is to split up your code so it's more readable and far easier to debug. Split this line: [mail addAttachmentData:[NSData dataWithContentsOfURL:[NSURL URLWithString:myPathDocs]] mimeType:@"video/quicktime" fileName:[myPathDocs lastPathComponent]]; into these: NSURL *fileURL = [NSURL URLWithString:myPathDocs]; NSData *fileData = [NSData dataWithContentsOfURL:fileURL]; [mail...

Outlook 2010 scripted rule using VBA

vba,email,outlook,rule,inbox

MAPI.Folders("Inbox") There is no such folder. Use the GetDefaultFolder method of the Namespace or Store class instead. Also you may find the Getting Started with VBA in Outlook 2010 article helpful....

Attachment not sent using Gmail and CDO in Excel/VBA

excel,vba,email,excel-vba

Solution is to get rid of the With Destwb and End with. I deleted them and added two lines instead: Destwb.SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum Destwb.Close SaveChanges:=True Followed by the send-code. It works now!...

Outlook VBA - set sentonbehalf and Refresh ActiveInspector

vba,email,outlook,outlook-vba

To make the From label show the right value, you need to set the PR_SENT_REPRESENTING_EMAIL_ADDRESS property (DASL name http://schemas.microsoft.com/mapi/proptag/0x0065001F) using MailItem.PropertyAccessor.SetProperty. UPDATE: As a test, you can try to run the following script from OutlookSpy - create a new message in Outlook, click "Script" button on the OutlookSpy Ribbon in...

How to send a mail by postfix mail server with rails?

ruby-on-rails,email,mailer

You need to change the delivery_method from :smtp to :sendmail config.action_mailer.delivery_method = :sendmail ...

Android URL connection java.io.FileNotFoundException

java,android,email,httprequest,bufferedreader

There's an issue with URL encoding. Take a look at This Link String query = URLEncoder.encode("apples oranges", "utf-8"); String url = "http://stackoverflow.com/search?q=" + query; ...

Pass parameters into an email

ruby-on-rails,email

I would do this (slightly pseudo-code-y as you don't explain your schema) #in Post model after_create :deliver_email_notifications def deliver_email_notifications Admin.all.each do |admin| Mailer.deliver_post_notification(self,admin) end end #in Mailer def post_notification(post, admin) #send an email to admin.email, using a template which has some information about the post end ...

How may i create Email accounts on my own server and receive emails to that account using PHP?

php,email

You can use cPanel's JSON API to create and manage your email accounts. It's too difficult to walk you through so I'll just leave this here. Good luck. http://geneticcoder.blogspot.com/2014/07/using-cpanels-json-api-with-php-curl-to.html...

How to get google app engine admin mail address?

java,google-app-engine,email

I believe what you are looking for is the way to figure out the email id that is valid to send out mail from. You can figure out the appid dynamically using the App Identity API and construct the sender email id dynamically. https://cloud.google.com/appengine/docs/java/appidentity/ Once you have the appid you...

javax.mail.getValidSentAddresses()

java,email,javax.mail,javax.mail.address

Set the mail.smtp.reportsuccess session property to true. This will cause Transport.send to always throw SendFailedException. You should also change the code to use Session.getInstance.

Codeigniter PHP Mailer, Sender Info

php,email,codeigniter-2,phpmailer,contact-form

Don't do that. It's effectively forging the from address and will fail SPF checks. Instead, use your own address as the From address, and add the submitted address as a reply-to address. In PHPMailer: $mail->From = '[email protected]'; $mail->addReplyTo($POST['emailfrom']); ...

Automatically export incoming emails from Outlook to existing Google spreadsheet [closed]

email,outlook,google-spreadsheet,export

Yes, it is. You can develop an Outlook add-in, see Walkthrough: Creating Your First Application-Level Add-in for Outlook to get started. The NewMailEx event is fired once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem,...

Spring Integration: SMTP server

java,spring,email,smtp,spring-integration

You likely need to add the errorChannel to whatever starts you flow; you need to show us the rest of your configuration. Alternatively, you can add an ExpressionEvaluatingAdvice to the mail adapter; see this sample for an example of using the advice....

Encrypted Querystring in URL getting changed to lowercase in Outlook

c#,asp.net,email,url,encryption

If outlook is sabotaging your links, then you need to make your links case indifferent. If you absolutely must keep upper and lowercase in your links for decryption, use a marker character: Generate encrypted string. Before each upper case character, insert marker character (pick a valid character your encryption scheme...

Accessing shared outlook inbox in python

python,email,outlook

The GetSharedDefaultFolder method of the Namespace class returns a Folder object that represents the specified default folder for the specified user. Sub ResolveName() Dim myNamespace As Outlook.NameSpace Dim myRecipient As Outlook.Recipient Dim CalendarFolder As Outlook.Folder Set myNamespace = Application.GetNamespace("MAPI") Set myRecipient = myNamespace.CreateRecipient("Eugene Astafiev") myRecipient.Resolve If myRecipient.Resolved Then Call ShowCalendar(myNamespace,...

Plain text emails displayed as attachment on some email clients

perl,email,attachment,mime,plaintext

I think this is the closes thing you're going to get to an answer The documentation for MIME::Lite says this MIME::Lite is not recommended by its current maintainer. There are a number of alternatives, like Email::MIME or MIME::Entity and Email::Sender, which you should probably use instead. MIME::Lite continues to accrue...

Change ActiveX email font

email,outlook,activex,activexobject

The Outlook object model provides three main ways for working item bodies: Body - a string representing the clear-text body of the Outlook item. HTMLBody - a string representing the HTML body of the specified item. Word editor - the Microsoft Word Document Object Model of the message being displayed....

How can I fetch emails on Android?

java,android,email,javamail

It looks like you are not using the AsyncTask correctly, especially seeing that you have a GO() method that directly calls doInBackground(). Remove the GO() method, there is no need for it. The proper way to execute an AsyncTask is to use the execute() method, which calls doInBackground() and runs...

Postfix rewrites my return-path

email,subdomain,postfix-mta,return-path

After the entire weekend of troubleshooting this I eventually found the reason: http://www.postfix.org/postconf.5.html#masquerade_domains plus restart of all postfix-related deamons (postfix, dkim and all that) helped....

how to disable phpmailer showing configuration details on browser

php,email

You can set $phpmailer->SMTPDebug=0; to prevent showing debug messages.

Laravel SMTP driver with TLS encryption

php,email,laravel,phpmailer

Well in that link you provided the solution is straight-forward. The correct solution is to fix your SSL config - it's not PHP's fault! ...

How to send email to registered user (MVC)

asp.net-mvc,email,asp.net-identity

I wrote a method for sending email via SendGrid: public static string SendEmail(string SendTo, string MessageBody, string subject) { try { string FromEmail = "your app's email"; System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage(); mailMessage.From = (new System.Net.Mail.MailAddress(FromEmail.Trim())); mailMessage.To.Add(new System.Net.Mail.MailAddress(SendTo.Trim())); mailMessage.Priority = System.Net.Mail.MailPriority.Normal; mailMessage.IsBodyHtml = false; mailMessage.Subject = subject; mailMessage.Body =...

SSRS Subscription: newly defined fails, old one works

email,sql-server-2012,subscriptions,reporting-services-2012

I deleted subscriptions and recreated them from scratch. And no errors, all works fine. Funny part is that I entered email addresses manually, in contrast with previous attempts on copy&paste them from elsewhere. Still weird....

Extract emails from comma separated file using ruby

ruby-on-rails,ruby,email

Looks like that is a CSV file, you could parse it like this. require 'csv' csv_text = File.read('input.csv') csv = CSV.parse(csv_text, headers: true) file = File.open("output.csv", "w") csv.each do |row| file.write("#{row['email']}\n") end ...

Android Studio javax.mail jar build error

java,android,email,android-studio

Add this to your dependencies section: compile 'javax.mail:javax.mail-api:1.5.3' ...

How to add image slider in email newsletter?

javascript,jquery,html,email,newsletter

unfortunately you cannot do it. Neither CSS3 sliders nor JS sliders will work in HTML email. NO-JS in Email newsletter. Proof? Inside the <head> of your email newsletter simply insert: <script>alert("JS WORKS! ...not");</script> Sent that email - and that's your proof that Email Clients do not support JS GIF animated...

Piping echo into sendmail in rc.local fails

linux,shell,email,sendmail,boot

Problem in using bash/zsh vs /bin/sh Bash and Zsh have builtin echo with option -e, but a system /bin/echo - not. Compare: /bin/echo -e "TO:[email protected] \nSUBJECT:System Booted \n\nBeware I live! \n" echo -e "TO:[email protected] \nSUBJECT:System Booted \n\nBeware I live! \n" You may use script like this: #!/bin/sh sendmail -t -vs...

SPF and DKIM records for Mandrill on DigitalOcean

email,dns,vps,spf,dkim

This article solved my issue. Tl;dr: add the SPF record without the domain name at the end....

Retrieving Blank Excel upon attaching excel in Mail

c#,asp.net,email

Well found the answer myself, instead of directly rendering the gridview i passed the value of the gridview in a TABLE then the table is the one i used for rendering, Sample below: Table table = new Table(); table.Rows.AddAt(3, FOAMTemplateGridview.HeaderRow); foreach (GridViewRow row in FOAMTemplateGridview.Rows) { int index = 0;...

php - Gmail doesn't accept emails that contains links

php,email,gmail,phpmailer

1.) Your website http://www.pascal-tweaks.esy.es/ is hosted on free domain provider..I think this is one of the reason for receiving mail in the spam folder.. 2.) try this when you post your site on facebook wall or you message anybody it ll ask you about the security check or captcha.. So...

Collapsing table cells in media query for emailing

html,css,email,responsive-design

solved my problem with the following lines : td[class="responsive-grey"], td[class="responsive-grey responsive-grey-spacing"], td[class="align-top grey responsive-grey"] { float: left; width:100%; } basically float left on all three columns...

How to obtain email address associated to Apple's ID

swift,email,apple

It is not possible at the moment (2015) and it seems to be no possible in the future.

JavaMail MimeMessage.getContent unsupported encoding

email,encoding,javamail

This JavaMail FAQ entry should help: Why do I get the UnsupportedEncodingException when I invoke getContent() on a bodypart that contains text data? ...

send email according time and date [closed]

php,apache,email,server

You should be using cron, here are some explanations and examples : https://www.pantz.org/software/cron/croninfo.html If you do not have access on your hosting to configure cronjobs, there are online services who can call your php for you but you'll have to rely on them. Look for "web cron" on Google. ...

IMAP migration and changes to folder structure

email,imap,dovecot

Are you using this? https://launchpad.net/ubuntu/+source/imapcopy/1.04-1. If so, edit imaptools.pas and change the following line as shown to copy all messages to the IMPORT folder on the destination. Original: Result := Command ('APPEND '+Mailbox + Flags + ' {' + IntToStr (Length(Msg)) + '}',TRUE); New: Result := Command ('APPEND IMPORT' +...

Outlook: Move item from me to a folder

vba,email,outlook

Right click on Email - Rules > Create Rule... Or go Advanced Options... and there is more Options Start with a blank rule, you can choose whether to apply the rule to incoming or outgoing messages After you select the conditions to identify the messages that you're looking for, you...

Create order sales_email_order_items html file

email,magento

You can enable the template path hints and then place an order, the template path hints will also be displayed in the email. Still you should have a look at this file app/design/frontend/base/default/template/email/order/items/order . Probably it might help you.

php file with HTML mail does not send image files

php,html,email

The images need to be referenced at their full path. For example: http://yourwebsite.com/yourimage.jpg

How do I use VB.NET to send an email from an Outlook account?

vb.net,email

change the smtpserver from smtp.outlook.com to smtp-mail.outlook.com web.config settings <mailSettings> <smtp deliveryMethod="Network" from="[email protected]"> <network host="smtp-mail.outlook.com" userName="[email protected]" password="passwordhere" port="587" enableSsl="true"/> </smtp> </mailSettings> ...

Email Validation in jQuery using RegExp

javascript,jquery,regex,email

You can grab all the email addresses separated by semicolons using the regex below: /(?:((?:[\w-]+(?:\.[\w-]+)*)@(?:(?:[\w-]+\.)*\w[\w-]{0,66})\.(?:[a-z]{2,6}(?:\.[a-z]{2})?));*)/g http://regexr.com/3b6al...

javax.mail.AuthenticationFailedException: 535 Authentication failed: Error: Not enough credit

java,email,smtp

This error is a custom error. Probably the elasticemail service is a payd service and you haven't enough credit to send emails. Check your credit....

php mail multiple email with same emails

php,email

You can have it comma seprated, see to ref from php docs mail('[email protected],[email protected]', $subject, $message, $headers); ...

PHP mail() function & PHMailer doubts

php,email,phpmailer

Whatever I have read, I can not send mail from localhost without SMTP. Is it correct ? You need to have mail server (like linux sendmail) to send messages. You can use your server's built-in mail post server or connect to SMTP. PHP has no built-in mail server /...

use formail to get last email of an email file

linux,bash,email,mutt

You can do it like this: formail -s formail -czx Message-Id: <mailbox | tail -1 This is probably not very efficient. However, more efficient methods are likely to be a lot more complicated....

AngularJS PHP contact cannot read property name

php,angularjs,email

This is how your PHP is setting the errors object it is returning to your Angular App: if (empty($_POST['name'])) $errors['name'] = 'Name is required.'; if (empty($_POST['email'])) $errors['email'] = 'Email is required.'; if (empty($_POST['message'])) $errors['message'] = 'Message is required.'; As you can see, in each case it is setting a different...

VBA Email with pasted chart and text in body

excel,vba,email,excel-vba,outlook

Change the selection start and end. Adding an extra line break might also be a good idea. You should also use MailItem.GetInspector instead of Application.ActiveInspector since the message is not yet displayed. Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .CC = "[email protected]" .BCC = "a[email protected]" .Subject =...

Referencing form data to php script and inserting it into database

php,mysql,forms,email

You should use a tick (') when binding variables in a query: $sql = "INSERT INTO emails (email) VALUES ('$email')"; It is okay not to use tick when the value of your variable you are trying to bind is an int....

PHPMailer not sending e-mail through Gmail, returns blank page

php,email,gmail,phpmailer,send

You've got some very confused code here. You should start out with an up-to-date example, not an old one, and make sure you're using the latest PHPMailer (at least 5.2.10). Don't do this: require('PHPMailer-master/PHPMailerAutoload.php'); require_once('PHPMailer-master/class.smtp.php'); include_once('PHPMailer-master/class.phpmail.php'); All you need is this, which will auto-load the other classes if and when...

Eclipse Selenium Facebook login issue (new page email) driver.findElement(By.id(“email”)).sendKeys(“”); Java

java,eclipse,email,selenium,facebook-login

Since its opening in a different popup you need to first switch to that window (popup) before doing any operation. Try to first get the window object of the popup and then Switch to the window the try to write the email. Below code will help to find the window....

Email a db file Android

android,email,attachment

Try this code, you have to pass your db name and email address on which you want to share db file. @SuppressWarnings("resource") public static void exportDatabse(Context ctx) { File backupDB = null; try { File sd = Environment.getExternalStorageDirectory(); File data = Environment.getDataDirectory(); if (sd.canWrite()) { String currentDBPath = "//data//" +...

How to read mail and insert into database using Mule?

java,email,mule,javamail

I think the answers are correct, however rather than hand rolling your own solution you might be better off using the IMAP connector A sample could be like the below <flow name="incoming-orders"> <imaps:inbound-endpoint user="${mail.user}" password="${mail.password}" host="${mail.host}" port="${mail.port}"/> <logger message="#[payload]" level="INFO" doc:name="Logger" /> </flow> ...

Contact Form fails to send out an email [duplicate]

php,email,contact-form

You need to add name attribute with each controller. Example <input type="text" class="span3 ie7-margin" id="name_contact"> Replace with <input type="text" class="span3 ie7-margin" name="name_contact" id="name_contact"> [name="name_contact"] added ===== If you get success message but mail not sent then check mail server logs at C:\xampp\apache\mailoutput If mail() returns true, thus php job is...

PHP email form without Refreshing Page

php,jquery,ajax,forms,email

Issues: if you usedocument.getElementById you must use id on your elements Add the data to your ajax request HTML: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $( "#submitBtn" ).click(function( event ) { alert('pressed'); //values var name=document.getElementById('name').value; var email=document.getElementById('email').value; var phone=document.getElementById('phone').value; var...

semicolon separated email validation in javascript only [duplicate]

javascript,regex,email

This will return array of invalid emails: function validateEmail(email) { var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return re.test(email); } var str = "[email protected];[email protected]; [email protected]@bc.com ; [email protected] ;[email protected];" var emails = str.split(';'); var invalidEmails = []; for (i = 0; i < emails.length; i++) { if(!validateEmail(emails[i].trim())) { invalidEmails.push(emails[i].trim()) } } alert(invalidEmails); JsFiddle...

Disconnect Client connected to cgi application

c++,windows,apache,email,cgi

I wrote a very simple c++ cgi using CodeBlocks and MinGW. All it does is that it creates a detached process and returns directly. It doesn't read any request. That will be left to you. To get data to the new process you will probably have to write what you...

Laravel 4.2 Sending email error

php,email,laravel,laravel-4

Closures work just like a regular function. You need to inject your outer scope variables into function's scope. Mail::send('invoices.mail', array($pinvoices,$unpinvoices), function($message) use ($email) { $message->to($email , 'Name')->subject('your invoices '); }); ...

Add image in email not as linked resource but should be visible in outlook

c#,html,email,outlook

Encode the image using base64 and add like this: <img src="data:image/JPEG;base64,{encoded string}"> Where the {encoded string} part is a base64 encoding of image data. JPEG can be gif or whatever according to type of image....

Validator EmailAddress can validate an array of email

php,validation,email,zend-framework2,jquery-select2

Why are you not embracing OOP? Create new validator for this: namespace YourApp\Validator; use Zend\Validator\EmailAddress; class EmailAddressList extends EmailAddress { public function isValid($value) { $emails = array_map('trim', explode(',', $value)); foreach ($emails as $email) { if (!parent::isValid($email)) { return false; } } return true; } } and in your validator spec:...

Symfony2 service unable to find template

php,email,symfony2,templates,twig

Even if your service lies in the same namespace as it's your template, that does not mean that you can call it directly like that. Did you tried the way you render normal controller templates, like this: ->setBody($this->twig->render( 'AppBundle:Emails:email-voucher.html.twig', [ 'order' => $order, 'voucher' => $voucher, 'customer' => $customer ]...

Sending MailChimp email with Rails

ruby-on-rails,email,devise,mailchimp,mandrill

So after much pain, I'm still not entirely sure what was wrong with the mailer format originally, but I changed it a little basing it on other websites approaches, to the following, and it worked. I changed nothing else. class NotificationMailer < ActionMailer::Base require 'mandrill' default from: "XXXXX <[email protected]>" def...

Sending email using smtplib doesn't work anymore

python,email,smtplib

This code is a working snippet. I wasn't getting the e-mails in my personal gmail account because gmail was sending it to the spam folder. I checked to see if it works at my office account, and it did just fine.

Trying to send “alternative” with MIME but it also shows up in capable mail client

java,python,email,content-type,mime

Basically, your mail is not arraged correctly. There are a few ways to arrange the parts in a MIME message so that they make sense to a mail agent. Let's start from the simple and go through to the complicated option: The simplest of all is text with a few...

Get email address from email body in outlook vba

vba,email,excel-vba,outlook-vba

So, I managed to figure this one out: When some emails bounce back, they seem to fail to include a "To" field, so Outlook does not consider that a MailItem. Since olMail had been declared as an Outlook.MailItem, when iterating through the Items collection, it would exit the sub once...

TypeError: object of type 'method' has no len() | Trying to attach file to email msg

python,email,smtp,mime

Fix in step 3, change smtpSettings.sendmail(sender, senderto, msg.as_string) to smtpSettings.sendmail(sender, senderto, msg.as_string()) because as_string is a method...

Send email with template (Mandrill JSON)

json,email,html-email,velocity,mandrill

Take a look at sendwithus. They provide a template management and sending API on top of Mandrill, and I know they support dynamic subject lines. Docs here.

php mail awkward change to sent content

php,json,email

Try to add newlines in your mail ("\n") between your urls, in order to limit the length of your text. $message .= $value . "<br />\n"; ...

Can I dynamically set the recipient of mailto: using only HTML and JavaScript depending on URL used to access the site?

javascript,html,email,dynamic,mailto

var l=window.location+''; l=l.replace(/http(s*):\/\/(www\.)*/,''); l=l.split('/')[0]; //get the domain var mailto='privacy-'+l+'@example.com'; ...

Timeout handle email php

php,email,redirect,location,sleep

Solution for the problem: Cron Job , Good learning.

How to log in user to my web application when he click on some link in his email

php,mysql,email,login,yii2

I'd probably recommend login tokens (preferably one-time use only) generated when you create the link created as a long hash (see sha256/sha512/GUIDs). You could (and should) also add validity dates to those tokens if need-be to ensure that someone doesn't reuse them and invalidate them on login or logout from...

php form mail function

php,email,variables,concatenation

As I mentioned in comments, you're overthinking this and there are a few simpler ways to go about this. Either by changing your whole block to: (no need for all those variables) $mail = " <h1> </h1><h2>Afzender:</h2><p> ( )</p><h2>Bericht:</h2><p> </p> "; then mail("$myEmail","$emailOnderwerp",$mail,... But, if you wish to continue using...

How to convert a file name when using Java Mail API

java,file,email

Filename isn't a base64 encoded string. It is encoded as defined by RFC 2047. Don't try to decode such strings by hand. Use solid libraries like Apache Mime4j for encoding/decoding mime messages. Add Mime4j to your project (here Maven): <dependency> <groupId>org.apache.james</groupId> <artifactId>apache-mime4j-core</artifactId> <version>0.7.2</version> </dependency> Use org.apache.james.mime4j.codec.DecoderUtil for decoding quoted-printable strings:...