w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Custom mass mailing with SendGrid
I would just set yourself up to use their REST API. I have used that to send thousands of emails per day. http://sendgrid.com/docs/API_Reference/Web_API/mail.html If you are worried about performance then make it into a job with Django Celery

Categories : Django

Mass Replace differetent word using notepad ++
Search for <esi:include src=([^/]*)/> and replace with <!--#include virtual=$1--> You can capture parts you want to reuse by putting round brackets around, that is called a capturing group. You can then insert them in the replacement string by adding $x, where x is the number of the capturing group. The groups are numbered by the opening brackets.

Categories : Regex

Implementing a mailing list: avoid infinite mailing list TO field loop
In your mailer function, after calling mail = mail(to: mailing_list_email, from: from, subject: subject) use message.smtp_envelope_to = real_to_email to deliver the message to each subscriber to the subscription list. Notice that some mailing services do not allow different to field in the envelope. Also make sure you're using SMTP as the backend for mail delivery.

Categories : Email

Is there any way to change word to another word depends on the condition inside the word?
Not sure exactly what you are after, but here is something: var startvalue = 0; if(MINVALUE > 0) { startvalue = MINVALUE; } Else if(MINVALUE < 0) { startvalue = MAXVALUE; } var result = String.Format(@"CREATE SEQUENCE ""MY_TEST_SEQUENCE"" MINVALUE 8 MAXVALUE 999 INCREMENT BY 1 START WITH {0} CACHE 20 NOORDER NOCYCLE",startvalue) Some more clarification of your question would allow for more useful answers.

Categories : C#

How to change the value of an UITextField by the given sender
You can accomplish this by using tags. In storyboard, give each textfield a tag, which can be accessed under the attributes inspector. Set this to 1 in one textfield and 2 in the other. Sender is of type id, which means that it can be any object. Since you know that the sender is going to be a UITextField, you have to tell the compiler that you're working with a UITextField by casting it. To do this, you in your showContactPicker: method say UITextField *newTextField = (UITextField *)sender; This tells the compiler that you are guaranteeing that the sender variable will be a pointer to a UITextField. After this, you can say if (sender.tag == 1) { //Change the slider corresponding to the first textfield } else if (sender.tag == 2) { //Change the slider corresponding to

Categories : Iphone

mass change values of arraylist
Assuming you have setCurrentX and setCurrentY methods opposite the getter methods, just loop through the list of circles. private void changeCoordinates(List<Circle> circles, int x, int y){ for(Circle c:circles){ c.setCurrentX(x); c.setCurrentY(y); } }

Categories : Java

What is sender.selected = !sender.isSelected actually doing to cause my button to toggle?
You can certainly use: if (sender.isSelected) sender.selected = false; else sender.selected = true; It's just that it's shorter to write sender.selected = !sender.isSelected, and it makes it clearer to the compiler what you want to have happen. And the compiler MAY generate more complex code for the longer form, which is of no benefit. It's probably worth getting used to "short form" of writing this sort of thing if you intend on using C or C++, because this sort of "trick" is quite commonly used.

Categories : Objective C

UNIX Sendmail Change Sender in Header
This can be done through the header information of the content text file. Script will be like follows. Mail sending command cat mail_content.html | /usr/lib/sendmail -t mail_content.html From: donotreply@sample.com To: info@sample.com Subject: Subject of the mail Mime-Version: 1.0 Content-Type: text/html <h1>Sample html body</h1> Here at the "from" attribute you can define the from address.

Categories : Unix

Twilio sms gateway Change sender id as text
Twilio evangelist here. The short answer is that today we only allow you to use a Twilio phone number as the caller ID when sending text messages from Twilio. You can read more about setting the caller ID for outgoing SMS messages here. Hope that helps.

Categories : PHP

Lync 2010 change display name of sender
It should be possible using Conversation.Impersonate(...), which contains the following option: displayName Type: System.String The display name of the user to impersonate. Optional. However, when I tried it, setting the displayname changed nothing. I ended up just setting the uri property to someusername@example.org to show the username. It looks like the Lync client only displays usernames for known users.

Categories : C#

Change view to arrange inbox as grouped by sender
Save the view. Put the name of the view into this code replacing Assigned. http://www.slipstick.com/developer/apply-view-to-folder-using-vba/ Sub GetAssignedView() Dim objViews As Views Dim objView As View ' Applies view to select folder Set objViews = Application.ActiveExplorer.CurrentFolder.Views 'Get the view Set objView = objViews.Item("Assigned") 'apply the view objView.Apply End Sub

Categories : Misc

Emacs equivalent of Vim's word motion and change in-line word
You can use universal-argument. There are two ways to move 3 words forward: C-u3M-f C-3M-f But that's usually slower than doing M-f 3 times. You know you don't have release M, right? I do not know what vim's civ does, but to go to a word just search for it with C-s. If you like to jump around have a look at Ace Jump. It works like the follow links feature of browser plugins like vimperator. With it you can jump to lines, word or even chars. Ok, I don't think there is a built-in for that. Maybe this function helps: (defun delete-word-at-point () "Delete word at point." (interactive) (let* ((p (point)) (beg (+ p (skip-syntax-backward "w_"))) (end (+ beg (skip-syntax-forward "w_")))) (kill-region beg end))) Put it in your ~/.emacs and bind to where yo

Categories : Vim

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

Mailing Service
I would recommend not using Gmail smtp for a web application in production. Instead use premium (paid) services like www.mailgin.com where you can also use your own domain for sending, etc. Or set up your own email server. I would also recommend using a framework for sending the emails, for example www.swiftmailer.org

Categories : PHP

Mailing queue in PHP
I've developed an email queue system for PHP that does exactly what you're asking for, check it our here. http://lorenzoherrera.github.io/emailqueue/

Categories : PHP

CodeIgniter Mailing loop
External (like mailchimp) is the easy and better way to go. But if you would do it yourself, read on. Create a table called 'mails_to_send', or whatever, with the email address, subject and body as columns (and ID and possible attachments, etc). Then create a PHP script that loops through x mails, sorted by oldest first (ID ASC), where x is some high number, but not too high so you won't hit PHP execution time limits. Loop through the x records, and send each mail (all necessary info is in the table). If you want to do this regularly: Set up a cron job that does this every y (every hour, or every 10 minutes, some number so the amount of emails you need to send is lower than the amount of emails you can send this way). Now forget about it. You can create an admin function to create news

Categories : PHP

Plone 4.3 MailHost not mailing anymore
You could try temporarily raising the error log level from INFO to WARN or even DEBUG in zope.conf if you have not done so. This has helped me troubleshoot email sending problems in the past by providing SMTP error feedback that did not show up otherwise. My experience is in Plone 3 but I'm guessing this may still be the same or similar: In [project dir]/parts/[instance]/etc/zope.conf <eventlog> level WARN ... </eventlog> You have to restart the instance for this change to take effect.

Categories : Email

My php script for mailing a form is not working
You probably have PHP errors that you are not seeing, try adding these lines to the top of your php: error_reporting(E_ALL); ini_set('display_errors', true); This code will enable error reporting, which probably will make you see something.. Also, this line: if($_POST['Duvidas'] = "Outras Dúvidas") is not comparing $_POST['Duvidas'] with "Outras Dúvidas" but is assigning the value "Outras Dúvidas" to $_POST['Duvidas'], which is always true.. Use if($_POST['Duvidas'] == "Outras Dúvidas") instead (note the ==). This might be cause of your problems.

Categories : PHP

A mailing platform using Amazon SES and Node js
I have a similar setup that uses mongodb. Messages are queued into a collection by various apps and processed by a separate node app. var mongoose = require('mongoose'), _ = require('underscore') ; var BATCH_SIZE = 50; var INTERVAL = 60000; mongoose.connect('mongodb://localhost/outbox'); var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; var MessageSchema = new Schema({ to: {type:String}, subject: {type:String}, body: {type:String}, queued: {type:Date} }); var Message = mongoose.model('Message',MessageSchema); function processQueue(){ var query = Message.find({}).sort({queued: -1}).limit(BATCH_SIZE); query.exec(function(err,messages){ if (err) return handleError(err); if (!messages.length){ console.log('Queue is emp

Categories : Node Js

PDF Signature gets rotated when e-mailing from iPad
In a nutshell The e-mailed PDF is based on the uploaded PDF. The change is that the original document (the uploaded PDF) contains two annotations which in the changed document (the e-mailed PDF) have been flattened, i.e. stored in the page content instead. Unfortunately the software doing that flattening simply appended commands for showing the annotation appearances to the page content ignoring the fact that the transformation matrix has been changed (rotated) in the already existing page content. Thus, the signatures are rotated, too, after form flattening. Thus, the software doing this form flattening has to be repaired (simply appending to the content without considering that the transformation matrix might have been changed actually is a no-go!). As a short term solution, though,

Categories : IOS

I want to find the word and replace the 3 word after the search string with my desired word in batch script
You were close. See mods to your code below. If you really want the first word after wordB... this will do it. Don't enable delayed expansion if you don't need it because that just messes you up if there are ! in the text. @echo off SET InFile=test.txt FOR /F "tokens=*" %%A IN ('FINDSTR "wordA" "%InFile%" ^| FINDSTR "wordB"') DO CALL :FindString "%%A" pause goto :eof :FindString SET String=%~1 SET String=%String:*wordA =% SET String=%String:wordB =% FOR /F "tokens=1" %%A IN ('echo.%String%') DO ECHO.%%A :goto :eof

Categories : Batch File

How do I get notified when user starts messaging or mailing app in iOS
Due to iOS sandboxing restrictions, you cannot get any information from your app regarding launching or usage of any other apps. The only way to do this would be if you were the developer of both apps. In that case you could use an external server to log when each of the apps is launched and then get this information from the converse app.

Categories : Iphone

Java Mailing Logic: Could not convert socket to TLS
Whether SSL/TLS is required or not is controlled by your mail server. If it requires it, you have to use it. You can set the mail.smtp.ssl.trust property to ignore the certificate issue, or you can fix it as described in the JavaMail FAQ.

Categories : Java

Simple mailing form with check boxes
action="mailto:?subject=Hello" This is not what you think it is. action specifies the destination URL. mailto: links are sent to the client, the server doesn't do anything with them. Ex: "mailto:mr.smith@matrix.com" "http://www.domain.com" mailto is like http here. To send mail using PHP you can the mail function or some other implementation. The action in your form will have to point to a script on your server.

Categories : PHP

How to forward github issues to mailing list?
You can iterate over a repository's issues events and store the last ETag header you're sent to then only get recent events. By doing so you can catch new issues, new comments on issues and how the state of those issues. The endpoint is described here and the data you'll receive is described here. This of course requires you pinging the API every so often but with an anonymous ratelimit of 60 requests per hour (and an authenticated ratelimit of 5000 per hour) you could at least have emails that are accurate to within a minute of something transpiring (unless you're doing this for multiple repositories, in which case you'd expire your ratelimit much faster). I don't know of any existing solutions, but one shouldn't be hard to put together.

Categories : Github

SmtpException while sending mails from a particular mailing server
This code is working for me public static string sendMail(string fromEmail, string toEmail, string subject, string body, string Name, string bcc="" , string replyTo="") { MailMessage mailer = new MailMessage { IsBodyHtml = true, From = new MailAddress(fromEmail, "yoursite.com"), Subject = subject, Body = body, BodyEncoding = Encoding.GetEncoding("utf-8") }; mailer.To.Add(new MailAddress(toEmail, toEmail)); // if (!string.IsNullOrEmpty(bcc)) {

Categories : Asp Net

can't generate delete link in rails mailing view
The reason is not working, i think, is because the :method => :delete is handled with javascript, and since the link is clicked from the email, javascript is not triggered. The way I would have try to solve this is by passing a parameter to the url like "delete=true" and handle it with that in the controller.

Categories : Ruby On Rails

Change last word on line in Vim
You can use the iw ("inner word") motion to select the whole word the cursor is currently positioned in. So combined with the c ("change") command, that'd leave you with ciw. That would also apply to your first example: instead of first moving forward to the end of word with e and then using cb to change the backwards word, you could also use ciw from your current position.

Categories : Vim

What is the best way to store e-mail accounts data used for sending mailing to customers in PHP?
ECB mode is insecure and the IV is ignored with this mode. You should really use CBC (MCRYPT_MODE_CBC) instead. When using CBC an IV is required for encryption and the same IV is required for decryption, so you need to hang on to this value (but don't use the same IV for all encryption/decryption, generating a random one as in your code example is correct). The IV does not need to be stored securely (any more securely than the encrypted data), and it's standard proceedure to prepend the IV to the encrypted data. bin2hex($iv . mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_CBC, $iv)); When decrypting you strip off the IV and pass it in to mcrypt_decrypt. $cipherTextDecoded = hex2bin($encr); $iv = substr($cipherTextDecoded, 0, $iv_size); $cipherText = substr($cipherTextDec

Categories : PHP

VIM does not replace the word after the dot punctuation. How to change it?
you're missing the g command that applies to all matches on current line, instead of only the first one: :s/sysname/version/g as a bonus: :%s/sysname/version/g will replace all occurences in current file, not only on the current line.

Categories : Vim

change word to number when inserting into DB
Try this : set value for option so when you select Administrator it will store 0 and for master it will store 1 <option value="0">Administrator</option> <option value="1">Master </option>

Categories : PHP

How do we change styles in a word contentcontrol via VB.Net
Converting your code to VBA (second part where you add 'essais' text) I would have this one: With CC.Range.Characters.Last .InsertParagraphAfter .Move wdParagraph '!!!!!!!!! .Style = "Nagłówek 1" .Text = "essais" End With As you can see I've added one line with '!!!! comment moving insertion point to next paragraph which was add with .InsertParagraphAfter method.

Categories : Vb.Net

Change color of first character of a word in php
<?php $text = 'Example Stack'; $text = preg_replace('/([a-z])/i','<span style="color:blue;">1</span>',$text); echo $text; ?> phpfiddle

Categories : PHP

How to loop a MS Word macro applying word by word in a selection?
You can do something like this: Dim myRangeIndex As Range Dim myRangeStart As Range Set myRangeStart = Selection.Range For Each myRangeIndex In myRangeStart.Words() myRangeIndex.Select Selection.MoveLeft Unit:=wdWord, Count:=1 Selection.TypeText Text:="a" Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Font.Color = -603914241 Selection.Font.Size = 1 Selection.MoveRight Unit:=wdWord, Count:=1 Selection.MoveLeft Unit:=wdWord, Count:=1 Selection.MoveRight Unit:=wdWord, Count:=1 Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="a" Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Font.Color = -603914241 Selection.Font.Size = 1 Selection.MoveRight Unit:=wdCharacter, Count

Categories : Vba

this is a php mailing script of a contact form but it is showing "country: unknown", i am using the following code
function visitor_country() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; $result = "Unknown"; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip)); if($ip_data && $ip_data->geoplugin_countryName != null) { $result = $ip_data->geoplugin_countryName; } return $result; } You're putting "Unknown" as $result. Is pretty clear here that or ip_data hasn't a value, or that $ip_data->geoplugin_countryName is nul

Categories : PHP

Use of tab-size style (CSS) attribute seems to be being ignored - could be a browser bug, want to check before informing mailing list
Please check the MDN documentation on the tab-size property. It is still an experimental property and as such you need to add vendor prefixes to make it work in some browsers. Chrome accepts plain old tab-size without a vendor prefix, but to add Firefox and Opera support you will need to do the following: tab-size:4; -moz-tab-size:4; -o-tab-size:4;

Categories : HTML

Label change color of a word dynamically
If you use Label to represent the text, you should use TextBlock instead. Then you can do like this: TextBlock tb = new TextBlock(); tb.Inlines.Add(new Run("Hello")); tb.Inlines.Add(new Run("cruel") { Foreground = Brushes.Tomato }); tb.Inlines.Add(new Run("world !")); Label is a content container control, it means that it is used to show not only text, but something else (images, panels, texts). When you want to show the text only, you should use TextBlock in WPF. This allows you to work with it, as you describe earlier. If the Label is required anyway, add a container (stackpanel for example) and add a TextBlock into it.

Categories : C#

Pyqt Change color of one word in TableView
I don't know much about Python but here's an idea. The solution is to use a custom delegate for the column of QTableView and implement its paint() method with rich text support. In delegate's paint() logic wrap your keyword into HTML tags like <font color="red">keyword</font> before displaying. You can find a sample C++ code here.

Categories : Python

Change one letter color in VB Ms Word 2007
While dealing with VBA you have to consider ranges and then properties of the given ranges. Here you have a sample code doing what you want: Private Sub CommandButton1_Click() Set Object = ActiveDocument.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=10, Top:=10, Width:=80, Height:=80) With Object.TextFrame.TextRange .Text = "Hi my name is Koki" With .Characters(2).Font .ColorIndex = wdTurquoise 'http://msdn.microsoft.com/en-us/library/office/aa195611(v=office.11).aspx End With With .Characters(12).Font .ColorIndex = wdTurquoise End With With .Characters(18).Font .ColorIndex = wdTurquoise End With End With End Sub As you can see, I am adding the textbox at the

Categories : Vba

Hello_World is a word in Python, it is different in an other mode. How I change it?
I think you're looking for this: (modify-syntax-entry ?_ "w") Underscores will be treated as part of a word. This command will change the syntax table of the mode you're currently in. AFAIK there's no way to change syntax globally. However, you could try modifying the standard syntax table. Most major modes inherit the standard-syntax-table. (modify-syntax-entry ?_ "w" standard-syntax-table) If that doesn't work, I guess you have to add mode-hooks for all modes you're using and modify their syntax tables individually.

Categories : Python



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