w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Mail Merge Macro
The main thing you need in recent versions of Word (which use OLE DB to connect by default) is: WordDoc.MailMerge.OpenDataSource Filename:=Data, _ SQLStatement:="SELECT * FROM [Sheet1$]" then you perform the merge using WordDoc.MailMerge.Execute and if you are merging to a new document, the output will typically become the ActiveDocument. You shouldn't need this for the merge... Sheets("Sheet1").Select

Categories : Misc

best way to do a mail merge for an .NET application?
I faced this problem and unfortunately there are 3 solutions, all terrible in some way: OOXML API Use the Office Open XML API: http://www.microsoft.com/en-us/download/details.aspx?id=5124 - and manually walk the Document XML tree to inspect the mail-merge elements, perform the text replacement yourself, then save. Advantages: Free Disadvantages It took me 6 months of stressing with this approach before giving up No built-in API for mail-merge Simple merge-field replacement is simple enough, but there are complex-fields spread out over several <w:run> elements which are a pain to replace. Bonus: since Word 2010 all new fields are the complex type. Only support OOXML files (.docx). No support for Word 97-2003 files (.doc). Aspose Saas (formerly Saaspose) API Advantages: C

Categories : Dotnet

Mail Merge with different attachment for each recipient
I had a look at your second link and made a copy of of curiosity... It seems that what you want to do could be quite easy to achieve if you can deal with a part of the job being manual, i.e. getting the IDs of all the attachments you want to add. It could also be possible to import these files and assign each of them to every email in a script but that would make the whole thing more complex. Assuming you are ready to get the IDs you should add a 5th column in the "data to be merged" sheet (col F) and change the script as follows (I reproduce only the relevant part starting on line 70 :function runMailMerge() { ) function runMailMerge() { //set up the status column, so it's blank, and pink var sheet=SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data to be merged"); //used l

Categories : Google Apps Script

How to Use Mail Merge Template file with PHP
I have been looking for the same thing and I ran across this article: http://www.dynamicdrive.com/forums/showthread.php?50825-How-to-do-Mail-Merge-with-php-and-MySQL Essentially they suggest using the file() function to pull the file contents into an array and then loop on the array with str_replace(). Obviously this means that the strings you want to replace need to stand out (the questioner was using % at the beginning and end of each string), but if I'm not mistaken mail merge tags are identified with '<< >>'. Good luck!

Categories : PHP

Access Mail Merge: Security Implications
Access databases normally are not exposed to Internet or really malicious users. Therefore there not many tools were developed to protect from SQL Injection. If you think your application is vulnarable, for this statement is can suggest an easy fix. it may be not bullet proof for all cases, but should suffice for you. For non-character types you can cast the variable into its type. So casting a malicious string into integer will cause an error. sqlstatement:="SELECT * FROM [Customer Data] WHERE [Customer Data].[Status]='Complete' AND [Customer Data].[CompletedBy] = '" & cast ( cast (userID as int) as varchar (50))& "' AND [Customer Data].[Date Completed] Between #" & cast ( cast ( date1 as date) as varchar (12)) & "# And #" & cast ( cast ( date2 as date) as varch

Categories : SQL

Using Rich field data to maintain formatting with Word Doc Mail Merge
Could you try saving your document as an .html web page, then simply use that generated code? I got something like: <p class=MsoNormal>Hello hello hello.</p> <p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l0 level1 lfo1'> <![if !supportLists]><spanstyle='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'> <span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span> <![endif]>Test</p> <p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l0 level1 lfo1'> <![if !supportLists]><spanstyle='font-family:Symbol;mso-fareast-font

Categories : HTML

Programmatically create [Mail Merge] PowerPoint slides from Excel data
This is definately possible, and quite fun :-) My first recommendation, is to create a powerpoint template using master views, with placeholders and titles all ready to go. Then run the following powerpoint macro, so that you can get the name and index/id for every shape on the page. Sub nameshapes() Dim sld As Slide Dim shp As Shape Set sld = Application.ActivePresentation.Slides(1) For Each shp In sld.Shapes shp.TextEffect.Text = shp.name & " " & shp.ID Next End Sub This is a quick and dirty piece of code that puts the index & name of each item on your template page, into the shape itself. Memorise, record these. These are your reference points for where you want stuff to go. I'm not going to go over the basics of looping etc, but go over the key code peices. 1) Op

Categories : Excel

Is it possible to have a print button link as the content of the mail
To print specific content of an email you need to run javascript in your email and that script may have adverse effects in your email. some client sides respond email with js as spam and some will block that will create problem to you. So in my case better way is not to have print button in email.

Categories : PHP

how to print MerchandiseReturn label with USPS
If the request is approaching the API then it would return the response which can be the proper expected response or the error code with some error detail. The problem for not getting the proper response might be of the following here- Wrong XML passed to the query string Missed some required fields in the XML Invalid Web Tools Credentials In order to know the exact Error Code and Details you need to parse the returned XML from the API Server. You can get the response stream and read the stream to the Stream Reader string result = null; using (HttpWebResponse response = httpWebRequest.GetResponse() as HttpWebResponse) { StreamReader reader = new StreamReader(response.GetResponseStream()); result = reader.ReadToEnd(); } However I implemented this in .Net MVC but it might

Categories : PHP

Joomla 2.5 - edit "| print |" icon label
Yeah, five minutes later I think of a solution. facepalm Replace: <?php echo JHtml::_('icon.print_popup', $this->item, $params); ?> With: <a href="#" onclick="window.print();return false;"><?php JText::_('JGLOBAL_PRINT') ?></a>

Categories : Joomla

select element appears as label in print
You got to have two identical element in your page SELECT element - which is visible on media screen and hidden on media print Label/Div element - which will contain the selected value, and will be visible in media print and hidden in media screen For example: <SELECT class='noPrint'><OPTION></OPTION></SELECT> <DIV class='Print'>[selected value of SELECT element]</DIV> @media print { .noPrint { display:none; } .Print { display:inline-block; } } See here for definition of media types

Categories : Javascript

How to integrate USPS DelivConfirmCertifyV4Request API to print label into our web application
Their documentation shows that the API parameter should be set up like so: ?API=DeliveryConfirmationV4.0Request

Categories : C#

How to print ZPL label stored after Feed Button Clicked - TLP 2824 plus
There are two ways to accomplish what you are trying to do: Add a Zebra KDU or KDU Plus http://www.zebra.com/us/en/products-services/accessories/keyboards.html The KDU will allow an operator to recall a format stored on the printer. You have to purchase a KDU. To program the Feed button you will need to create a program that runs on the printer using Zebra BASIC Interpreter (ZBI - http://www.zebra.com/us/en/products-services/software/adapt-software/zebra-basic-interpreter2.html ) This way is more complex and you need to purchase $99 ZBI License to unlock the ZBI functionality on the printer, but with the right program you can get the functionality you are looking for.

Categories : Misc

E-mail app/filter that copies E-mail from the body of the letter and auto replies to that e-mail
I would suggest checking out Google Apps Script. You can create a script just like you would create any other Google Document in Drive by adding the Scripts module from the app store (Scripts is free and created by google). You can also use the gmail API to do the same thing. Both are very well documented and provide a surprisingly high level of access to your emails and their content.

Categories : Email

Why I send a mail with PHP, but receiver get a mail with attachment named "mail.html"?
Did you use any headers? $headers = 'MIME-Version: 1.0' . " "; $headers .= 'Content-type: text/html; charset=iso-8859-1' . " "; // Mail it mail($to, $subject, $message, $headers); Don't use foxmail so no clue if it works...but if you didn't send headers it's worth a try.

Categories : PHP

How to use EWS to retrieve mail-related information about Exchange mail-enabled public folders
I'm able to get it with the following, you'll need to translate it to c#. The result is a folder object extended with an Email property. $PR_PF_PROXY = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition 26397,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Binary $view.PropertySet.Add($PR_PF_PROXY) $foldersResult = $ExchangeService.FindFolders(Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::PublicFoldersRoot,$view) foreach($folder in $foldersResult.Folders) { $folder = $folder | Add-Member -MemberType NoteProperty -Name Email -Value $null -PassThru $guid=$null if($folder.TryGetProperty($PR_PF_PROXY,[ref]$guid)) { $dn=[bitconverter]::ToString($guid) -replace '-' $folder.Email = ([

Categories : C#

postfix; pipe mail content to script for all mail of specific subdomain
It seems i solved the mystery problem. When i create an alias myself from test@example.com to test@vacation.example.com, the script gets called. mail.log Jul 12 15:20:55 mail postfix/pipe[14843]: 8854BB80B07: to=<test@vacation.example.com>, relay=vacation, delay=0.19, delays=0.07/0/0/0.12, dsn=2.0.0, status=sent (delivered via vacation service) vacation.pl logfile: 2013/07/12 15:21:27 DEBUG> /var/spool/vacation/vacation.pl:550 main:: - Script argument SMTP recipient is : 'test@vacation.example.com' and smtp_sender : 'peter@example.org' 2013/07/12 15:21:27 DEBUG> /var/spool/vacation/vacation.pl:580 main:: - Converted autoreply mailbox back to normal style - from test@vacation.example.com to test 2013/07/12 15:21:27 DEBUG> /var/spool/vacation/vacation.pl:590 main:: - Emai

Categories : Misc

Multiple line processing by SED to change incoming e-mail sender and keep their e-mail within bugzilla comments
Using sed to parse MIME messages is going to be challenging, to say the least. Since you are already apparently using Perl for other things, I would implement this logic in a simple Perl script as well. Adding decoding for the various MIME content-transfer-encodings is then a trivial addition. Perl's Email::MIME package might be a good starting point. You already seem to have a basic understanding of the problem domain; many beginners would make the mistake of assuming that all messages are multiparts, or that all messages have exactly one text/plain part. (Maybe still emphasize that there may be none! Some clients just send a binary application/octet-stream if there is no textual content, or the client may be set up to only compose text/html and not generate a text/plain rendering fo

Categories : Email

Java Mail: Only one part of the message is retrieved / Parsing error / Badly formatted mail
JavaMail debugging tips are here. You can get the entire message text using the Message.writeTo method. Write it to a FileOutputStream or a ByteArrayOutputStream. You might have better luck using the JavaMail reference implementation instead of the Geronimo(?) version you're using.

Categories : Java

Warning: mail(): SMTP server response: 550 This is a submission only port. You must authenticate before sending mail in
php.ini & SMTP= - how do you pass username & password PHP mail() command does not support authentication. Your options: ...

Categories : Email

PHP mail() in dev environment: open the mail in a browser/editor instead of sending it?
Include a means of determining your environment in your project, or at least some kind of global variable that holds that information. Then build an abstract mail interface that either sends real mails if it's running on a production server, but logs them to local files in case it runs on a dev machine / environment. As a logging package, I would recommend Monolog. This would allow you to design the rest of your application (or at least the mail sending components) in a way that doesn't have to care about the environment.

Categories : Email

Switched exchange servers, kept the same e-mail but some incoming mail is still going to the old server
I'm assuming that you changed the MX records for your domain, so that they now point to Microsoft 365's mail servers, correct? If so, it may take a day or two for the DNS changes to propagate.

Categories : Email

Sending mail via Java API: How to send the mail even if attachment fails?
Yes. I would expect to be able to do (pseudo-code follows) try { // set up standard message try { // perform attachment } catch { // perhaps amend your original message to indicate attachment failed } send(); } catch { // handle a complete failure here... } although I'd concentrate on why the attachment fails. Does that even make sense ? You may take the approach of building/sending in two different methods, such that you don't have to clean up / modify your message in the face of a failure. That may be a cleaner approach e.g. (pseudo-code again) try { sendMessageWithAttachment(); } catch { sendMessageWithoutAttachment(); }

Categories : Java

Java send mail automatically with local mail client
The answer is Java Mail API. Basically, you need a mail account (usually username+password), you also need the mail SP's SMTP server address, which is usually on their website.

Categories : Java

Can we send Multiple Mail in wso2esb in same sequence or dynamically set a mail
You can refer Proxy configuration in [1], which sends an email after retrieveing the email address from the database. [1]http://wso2.com/library/articles/2012/01/integrating-different-systems-with-wso2-esb

Categories : Wso2

SSIS E-mail Script issues. NOT SEND MAIL TASK
Hello bank teller, I'm a friend of Bob's and he said I can use his account. Honest. I might take money out but I'll put it back. This is essentially the conversation that is happening between your mail system and your SSIS package. The mail system isn't trusting that Alice has the authority to send email on Bob's behalf. Why it's silently swallowing the error is dependent on your code. Perhaps there's a status you aren't checking that signals the email was not sent. Update your question with your actual code if you want some eyes to review it. There are two options for resolution. The first, and probably least agreeable, is to have the From account authorize every possible user. Dumb, horrible and probably violates every practice known to man but it'd entail no code change. The "rig

Categories : SQL

Default mail client continues to be running in background after mail is sent
Ok finally figured out the solution. The problem is, am using Application#Context to start the activity. When ever we use Application#Context a new Task is created ( that's why, adding the flag Intent.FLAG_ACTIVITY_NEW_TASK in the intent if we don't add this Flag then app crashes) . To avoid creation of new task all we need to do is use the right context ie., use the activities context. ("Be careful and avoid memory leaks in case storing the activity context reference"). So the code is as below Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("message/rfc822"); intent.putExtra(Intent.EXTRA_SUBJECT, "Report issue: ""+mIssueTitle+"""); intent.putExtra(Intent.EXTRA_TEXT, mailBody); String[] mailIds = new String[] {getReportingMailId()}; intent.putExtra(Intent.EXTRA_EM

Categories : Android

Stop registration mail while sending invitation mail in ruby
I did this (and a few other modifications) by altering the devise_invitable controller action for create. The README has a section called "Configuring Controllers" to get you started down this road. You want to follow the instructions in that section to create a new controller that inherits from Devise::InvitationsController. In the newly-created controller include a create method that uses the skip_confirmation! method and then super (refer) to the parent controller to finish the action. This is untested code, but you'd have something like: class Users::InvitationsController < Devise::InvitationsController def create resource.skip_confirmation! super end end When I was figuring out how to modify the default Devise_Invitable behavior, I found looking at the sou

Categories : Ruby On Rails

What is the best way to generate HTML mail templates for the Grails mail plugin?
Templates can include other templates using the g:render tag. If you don't want the inline css mixed with your mail html, place it in its own template and use the render tag to insert it into the html template: mail/_css.gsp: <style type="text/css"> body { /* styles! */ } </style> mail/_message.gsp: <html> <head> <g:render template="/mail/css" /> <!-- render stylesheet into this template --> </head> <body> <!-- content --> </body> </html>

Categories : Grails

Invalid Addresses; nested exception is:com.sun.mail.smtp.SMTPAddressFailedException: 501 5.5.2 RCPT TO syntax error (When i try to send mail)
See this list of common JavaMail mistakes. Turn on JavaMail session debugging and post the protocol trace so we can see exactly what the server is complaining about. Most likely there's something wrong with one of the addresses you're using.

Categories : Java

Asp.net:How to fix exception thrown when sending mail message to multiple recipients?erroline:An invalid character was found in the mail header: ','
Please take a look at this. I don't know the credentials so I assume you can add them up. void Sendmail_Click(object sender, EventArgs e) { List<DAL.Customer> mailId = (from rs in General.db.Customers where rs.IsActive == true select rs).ToList(); SmtpClient smtp = new SmtpClient(); mailMessage.From = fromMail; mailMessage.IsBodyHtml = true; foreach (var item in mailId) { mailMessage.To.Add(new MailAddress(item.Email)); } lblStatus.Text = "Email sent successfully"; }

Categories : C#

Unable to get emails sent by PHP mail function because of another mail server
The first thing to establish is how you are sending emails (sendmail or SMTP). Then, whether your emails are a) not sent at all or b) getting rejected by the destination mail server. I'd check all available logs (source and destination mail servers and daemons). See if mail() itself is erroring. Try using sendmail/smtp directly. If its the destination server rejecting the mail based on its spam score, try setting SPF records to enable the web server to send mail legally.

Categories : PHP

postfix 2.9.6.1 forward all mail to an external mail address
Finally found the answer. Listing here for posterity. Add the folowing line to the end of your main.cf file vi /etc/postfix/main.cf virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp Create a file which lists the mail address you want all mails to be sent to vi /etc/postfix/virtual-regexp Add the following: /.+@.+/ forwardingmailaddress@gmail.com add it to postmap postmap /etc/postfix/virtual-regexp you will need to add a virtual file. touch /etc/postfix/virtual now add it to postmap postmap /etc/postfix/virtual

Categories : Ubuntu

zimbra doesnt receive mail from php mail function
Check logs on Zimbra MTA server, it's located at: /var/log/maillog Check if you see you php-server trying to reach Zimbra. You may get blocked cause Zimbra think you php-server is sending spam, or fail on one of many checks. Either way, the maillog should say something about it.

Categories : PHP

Exim Mail Transfer Agent can't deliver mail
Looks to me like your ISP has blocked connections outbound to tcp/25. Why did you reject your initial supposition that it was the firewall? The logs you quoted indicate that your server can make DNS requests, but there are no successful attempts to connect to a mail server. It could still be a local firewall issue but these days its very common for ISPs to prevent their clients from sending email to tcp/25 unless you have explicitly requested the ability to do so (and sometimes not even then). Take exim out of the equation and run this from the command line of your mail server: telnet 65.54.188.94 25 if you can connect, it's a problem with your exim install. If you can't connect, it's a network issue, whether a local firewall, ISP firewall, etc.

Categories : Email

Pear Mail script not authenticating to send mail
Ok, so I totally gave up on Pear::Mail and just converted the entire script to PHP_Mailer. It's now working with no issue function send_email($from, $to, $subject, $body) { ini_set("include_path", ".:/home/user/public_html/PHPMailer_v2.0.4/"); require_once("class.phpmailer.php"); global $debug; $mailer= new PHPMailer(); $mailer->IsSMTP(); $mailer->Host = 'localhost'; $mailer->SMTPAuth = true; $mailer->Username = "email"; $mailer->Password = "*******"; $mailer->FromName = "User"; $mailer->From = "email"; $mailer->AddAddress($to); $mailer->Subject = $subject; $mailer->Body = $body; if(!$mailer->Send()) { //echo "Message was not sent"; echo "Mailer Error: " . $mailer->ErrorInfo; exit;

Categories : PHP

javax.mail unable to send mail to hotmail
You named the properties mail.smtp*s* instead of mail.smtp There is already a question which is solved, have a look: Java Mail over TLS

Categories : Java

What's the difference between "svn merge --reintegrate" and svn merge without reintegrate if I'd like to merge a branch onto the trunk
A sync merge is something completely different than a reintegration merge. The former is used to merge all changes made on the parent branch to the target branch (typically a feature branch), that have not already been merged. The latter is used to merge a (feature) branch back into the parent branch. Basically that means a temporary clone of the (feature) branch is created, a sync merge is made from the parent branch to the temporary branch, and finally the parent branch is replaced by the temporary branch. In other words, the temporary branch contains all changes made to the (feature) branch and parent branch. For some reason, some developers do not understand the difference. So, the SVN developers removed the option --reintegrate in SVN 1.8. With this version, the tool detects automati

Categories : Svn

php mail - include a html file in the mail
You can use the PHP function file_get_contents() to simply extract the contents of a file. So your $msg variable would be built like this: $msg = file_get_contents("mails/airbill.php"); If airbill.php needs to be passed through the PHP interpreter, you could use the include() function's return value (which is the evaluated code). To use this method, the airbill.php file needs to actually return it's content as a string (using a simple return statement). So you could do something like this: airbill.php : <?php $message = <<<message <strong>This</strong> is the content of the <span style="...">email</span> message; return $message; ?> Your other file would look like this: $interpreted_content = include("mails/airbill.php") $msg = $interprete

Categories : PHP

sending mail from localhost using mail() function
You should not use the mail command, its quite unstable on windows and should in fact not even be used on Linux. You should use the PHPMailer Class by Worx of PHPMailerLite class. This connects to the SMTP Server. It's giving you a lot of extra options. You should try implementing the PHPMailer class for you own sake!

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.