w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Validate Mandrill's X-Mandrill-Signature
The problem comes from your input data format. You have to concat key/value pair, example: var data = URL; for(var key in POST_DATA) data += key+POST_DATA[key]; And now, you can check if base64(sha1(data, mkey)) is equal to the signature.

Categories : Javascript

How does Mandrill work?
Mandrill automatically adds any domain names that are used for outgoing mail to the Domain list that you are seeing. This is normal. I should make it clear that Mandrill is NOT using any Gmail server to send you message. The message is being delivered through the Mandrill system alone. Once you get your custom domain you should begin using that as the "from" address for your emails. This domain will then show up in the domain list. I highly recommend that you setup the proper DKIM and SPF records in your custom domain DNS records. Mandrill has very clear instructions on how to do this. Just click on the "View DKIM settings" and "View error details" in the domain list. I recommend you check out the following page for additional information: http://help.mandrill.com/entries/21681347-How

Categories : Ruby On Rails

Mandrill ValidationError
I don't know about mandrill, but your $content string has double quotes" in it and your delimiter in the $postString is also double quotes. This is going to break in any language. You need to escape the double quotes in the $content as required by mandril. "html": "' . $content . '", will translate to "html": "<p>this is the emails html <a href="www.google.co.uk">content</a></p>", ^ ^ Try "html": "' . str_replace('"','\"',$content) . '", "text": "' . str_replace('"','\"',$content_text) . '", Instead of "html": "' . $content . '", "text": "' . $content_text . '",

Categories : PHP

Add PHP variables to Mandrill template
Doesn't look like you can use PHP with Mandrill, but you can use placeholders for custom content. Please take a look at the section of this page titled "Create dynamic content (placeholders for custom content)"

Categories : PHP

SPF Configuration for Mandrill and MailChimp?
you should be able to omit the Mandrill info from your SPF record, because it's already included by virtue of including the MailChimp one (that MailChimp record includes Mandrill, too). So you just need the include:servers.mcsv.net part. Your SPF record might need some other info, too, though, depending on how you manage your regular mail, to specifically authorize your own servers to send the mail. For example, if you use Google Apps for your domain, you probably want to include the Google SPF information, too. That's going to be pretty dependent on your regular mail, so best to contact your email hosting provider for more details on how to handle it specific to them.

Categories : Email

Send email with template (Mandrill PHP)
You can send the email and use the template by using the Mandrill PHP API wrapper. require 'Mandrill.php'; $mandrill = new Mandrill('YOUR_API_KEY'); $message = array( 'subject' => 'My subject', 'from_email' => 'marc@example.com', 'to' => array(array('email' => 'recipient1@example.com', 'name' => 'Marc')), 'merge_vars' => array(array( 'rcpt' => 'recipient1@example.com', 'vars' => array( array( 'name' => 'FIRSTNAME', 'content' => 'Recipient 1 first name'), array( 'name' => 'LASTNAME', 'content' => 'Last name') )))); $template_name = 'YOUR-TEMPLATE-NAME'; $template_content = array( array( 'name' => 'main',

Categories : PHP

Mandrill only recognize a few of my merge tags?
To populate merge tags (the *|SOMETHING|*, you actually want to use the merge_vars and global_merge_vars parameters instead of the metadata parameters. Metadata allows you to add information to the message, but it's only for your tracking/analytics (more on metadata here). Nothing from the metadata parameters is used to populate merge tags or content in the message. The *|EMAIL|* merge tag is special - if you don't provide a value, we'll automatically fill in the recipient's email address by default. So, in your API call, you should just be able to replace recipient_metadata with merge_vars and have those merge tags get populated as expected. For more on working with merge tags, check out the KB article here: http://help.mandrill.com/entries/21678522 And if you're still running in to i

Categories : PHP

Mandrill-api Excon::Errors::SocketError
It could have something to do with keeping the socket open beyond its expiration, given that it's an EOF error and is intermittent. Are there any settings for opening a new socket with each request, rather than reusing the same one?

Categories : Ruby

Bundler could not find compatible versions for gem "excon" for gem mandrill-api
I deleted my Gemfile.lock, if that doesn't work try running gem update excon and check that you have the version installed with gem list | grep excon for the correct version.

Categories : Misc

Mandrill Mailchimp how to embed an image in email body
You can use the images API parameter as per this page: http://help.mandrill.com/entries/25252978-Tips-for-using-images-in-Mandrill-emails You need to provide the image name, base64-encoded image and the mime-type of the image, then refer to the image by its name in your email's HTML. It might look like this using the .NET Mandrill API wrapper (https://github.com/shawnmclean/Mandrill-dotnet) (untested): List<Mandrill.image> images = new List<Mandrill.image>(); Mandrill.image img = new Mandrill.image(); byte[] fileData = File.ReadAllBytes("C:sam.jpg") img.content = Convert.ToBase64String(fileData) img.type = "image/jpeg" img.name = "image_name" images.Add(Image) Email.images = images //(where Email is a Mandrill.EmailMessage) And then in your email you would have code like t

Categories : C#

Django + Heroku + Mandrill mail_admins() not working, either manually or as triggered by 500 error
Have you checked your Mandrill API logs? I am having the same issue and noticed that the emails are being sent to the Mandrill API (since I set my smtp settings for Mandrill in settings.py), but that the from_email and from_name are empty in the API calls. So, I found https://github.com/brack3t/Djrill and am about to install it. I'll let you know if it "just works". EDIT: So after installing djrill and following the documentation I'm getting failed API calls for error messages - the from_email is showing as "root@localhost" for some reason. When I do the shell test shown on the github page (with an email from an accepted domain for my Mandrill account replacing Djrill Sender), it works: from django.core.mail import send_mail send_mail("It works!", "This will get sent through Mandrill

Categories : Python

AFNetworking sending NSDictionary as single array values instead of sending them as complete objects
I think the issue comes about because you're using a default HTTP POST with arguments to send your value. You can confirm this by printing out the content-type of the post on the server side; it should be something along the lines of x-www-form-urlencoded. If that's the case, that data format can't really express arrays and dictionaries well. So you get the odd format you're seeing on the server side. What you probably want to do is send your data as JSON, not as plain form parameters. I believe the thing you want to do is set the parameterEncoding property of your AFHTTPClient to AFJSONParameterEncoding. This will send your request as JSON, which is capable of representing arrays and dictionaries correctly on the wire.

Categories : IOS

Sending data to google wallet it is sending response merchant error
The demo sample you are pointing to seems to work fine. You can also try some additional sample code in various languages (Java, Python, PHP): https://developers.google.com/commerce/wallet/digital/docs/samples MERCHANT_ERROR implies that something is wrong with the purchase request such as a badly formatted JWT. If you are trying to re-use the sample code in your app make sure to generate a new JWT using your Seller ID and Seller Secret.

Categories : Android

Android Email sending failed with error Fail to send: IOException while sending message
Try public final static String APP_PATH_SD_CARD = "/Images_Book/filetobeattached.ext"; Instead of public final static String APP_PATH_SD_CARD = "/Images_Book/";

Categories : Android

Error while sending attachments via Openerp 7 'Social Network' app but works fine while sending normal message
It's a bug. The reason being that context is not passed correctly when you click on the "Compose New Message" button or other send message buttons. The bug has been reported. They should be working on it by now.

Categories : Python

Sending email through MS Access VBA / Outlook, choosing sending profile
You need to log to the specified profile. After creating an instance of the Outlook application Set oApp = CreateObject("Outlook.application") add something like the following: set oNS = oApp.GetNamespace.Logon oNS.Logon("MyProfileName") Note if Outlook is already running, Logon will do nothing. You will need to use Extended MAPI (C++ or Delphi or a MAPI wrapper like Redemption (RDOSession.Logon) to log to a specified profile. Why not work with a single profile and create multiple accpunts? You can then set the MailItem.SendUsaingAccount property to specify a particular account.

Categories : Vba

POI not sending xls file as attachment , sending as string
The problem is not related to POI, but with JavaMail (plus the way different email clients handles the specs and malformed emails). Try this: Multipart multipart = new MimeMultipart(); MimeBodyPart html = new MimeBodyPart(); // Use actual html not "strstr" html.setContent("<html><body><h1>Hi</h1></body></html>", "text/html"); multipart.addBodyPart(html); // ... // Joop Eggen suggestion to avoid spaces in the file name String fileName = "Service_Change_Alert_" + new SimpleDateFormat("yyyy-MM-dd_HH:mm").format(date) + ".xlsx"; ByteArrayOutputStream baos = new ByteArrayOutputStream(); updateDataBook.write(baos); byte[] poiBytes = baos.toByteArray(); // Can be followed by the DataSource / DataHandler stuff if you really need it MimeBodyPart at

Categories : Apache

What should I use: bulk e-mails (with MailChimp) or transactional e-mails(with Mandrill)?
Transactional emails are typically non-marketing emails. Usually they are a thank you, confirmation, invoice, receipt etc. Something that is related to a transaction your customer made. General newsletters or promotional/sales emails (anything sent in bulk to a list) is not transactional. Here is Mailchimp's What is transactional email link

Categories : Email

When when sending an email of zip file size 19mb its not sending the email?
Try sending a simple text file to vet your solution even works. If that comes through, then your ISP may be filtering. Some ISP's have 5mb limits. Also make sure you only have pictures in those zips. If you have any exes etcs those can be blocked. Check your spam folder. Really though, just make sure a text attachment goes through.

Categories : C#

Sending Block Ack in 802.11
For the client to send Block Ack, it needs to be connected at 11n rate at least and ADDBA stream must be opened between client and AP. There can be various reasons why it's not happening, starting from client that doesn't support 11n and up to noisy environment that prevents reaching high rates. P.S. This should be migrated to serverfault.com

Categories : Networking

Sending free sms using PHP
1) I need help to understand what is actually being done. The code is sending two HTTP requests to the service. The first request signs in with your username and password, and it stores the session cookies for the next request. The second request is the one that actually triggers the send, it takes the mobile number and other details as POST data. The second request is able to use the session created by the first request because of the cookiejar. 2) Secondly,how can I modify it to optimally send sms to multiple people If the service allows you to input multiple mobile numbers (for example comma separated) then that would be most optimal because it would only require the two requests to send to all mobile numbers. If not, you will have to loop the second request so that there is

Categories : PHP

Sending mail of GAE for PHP
I believe you need to either specify textBody or htmlBody, depending on the format of the message you're sending. $mail_options = [ "sender" => "admin@example.com", "to" => "user@example.com", "subject" => "Your example.com account has been activated.", "textBody" => $message_body ];

Categories : PHP

SMS scheduling not sending sms
Try to use Broadcast Receive first and then start a service. Something like that: create a function: public static void setRecurringAlarm(Context context, Class<?> cls, int time, int minute) { Calendar updateTime = Calendar.getInstance(); updateTime.setTimeZone(TimeZone.getDefault()); updateTime.set(Calendar.HOUR_OF_DAY, time); updateTime.set(Calendar.MINUTE, minute); Intent alarm = new Intent(context, cls); PendingIntent recurringAlarm = PendingIntent.getBroadcast(context, 654789, alarm, PendingIntent.FLAG_CANCEL_CURRENT); AlarmManager alarms = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); alarms.setRepeating(AlarmManager.RTC_WAKEUP, updateTime.getTimeInMillis(), AlarmManager.INTERVAL_DAY, recurringAlarm); } If you don't wan

Categories : Java

sending a big file in UDP in C
UDP is a "best effort" protocol. There is no retransmission if data is lost in transit. It probably depends quite a bit on the path your data takes what kind of reliability you'll get. If the first 4 or 5 datagrams fill a queue 6 may get dropped. Additionally, if the maximum transmission unit (MTU) on path to your destination is ever less than the size of your packet your datagram will get fragmented, broken into parts. Since you don't retransmit, the loss of any fragment will doom the entire packet. As the datagrams get bigger the changes of this happening will increase. It seems like most folks recommend in the neighborhood 0f 512 bytes as the maximum size of a UDP packet if you're going to traverse the internet with it.

Categories : C

sending variable from one jsp to another jsp
If the reason for including your jsp 2 in jsp 1 is for sending variable, then its not needed. you just need to set a hidden variable in jsp 1, and in your jsp 2 you should able to access it, by using the jsp implicit request object.

Categories : Java

sending form with php
You are missing the form attributes, the POST method mainly: <form action="" method="post"> It specifies that the form will be send by POST and not by GET. As you are getting all your variables using $.POST, you need to send send the form by this method. You can read more about it here. Also, as @Frits pointed out, your submit button is in another form. You should only have one form in which you have all your fields as well as the submit button.

Categories : PHP

Sending E-Mail in PHP
Does this work? First part: <?php $to = "yourgmail@gmail.com"; $subject = "HELLO"; $body = "HI!"; $from = "mygmail@gmail.com"; send_mail($to,$from,$subject,$body); ?> Second part: <?php function send_mail($to,$from,$subject,$body) { $headers = ''; $headers .= "From: $from "; $headers .= "Reply-to: $from "; $headers .= "Return-Path: $from "; $headers .= "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . "> "; $headers .= "MIME-Version: 1.0 "; $headers .= "Date: " . date('r', time()) . " "; mail($to,$subject,$body,$headers); } ?> I'm not sure if you can send mail via your gmail using php mail function, never looked into it, this should work for name@yourdomain.com

Categories : PHP

ASP Sending Mail
Your code will only work if CDO or CDONTS is installed and available on your server - though most webhosts that support Classic ASP will make this available. In VBScript, all objects (i.e. things that aren't numbers or strings) must be assigned using the Set operator. It's silly, I know, but this is what you need to do: Dim mail Set mail = Server.CreateObject("CDO.Message") mail.To = Request.Form("To") mail.From = Request.Form("From") mail.Subject = Request.Form("Subject") mail.TextBody = Request.Form("Body") mail.Send Response.Write "Mail Sent!" Set mail = Nothing If your server doesn't have CDO or CDONTS installed then you'll get an error message when you call CreateObject, but you haven't listed any error messages in your original ques

Categories : Email

Sending pm with Socket.IO
Do not use io.sockets.emit, but use the socket you stored in the clients array. When you want to send to a specific user, you should pass the username or -id, with the message, like so: socket.on('pm', function(message) { var to = msg.toUserId; var msg = message.message; clients[to].emit(msg); } From within the client: socket.emit('pm', {'toUserId': userid, 'message': 'hello over there'});

Categories : Node Js

Sending a SMS on Android through ADB
Instead of this , write your own intentservice like the following. Create a entry for the following IntentService in your manifest. String targetPhoneNumber = "XX-XXXXXXX-XXXXXX-XXXX"; SmsToSend targetSms = new SmsToSend(); String urlText = url; targetSms.setPhoneNumbers(new String[]{targetPhoneNumber}); targetSms.setSmsBody("Help me"); Intent smsIntent = targetSms.convertToIntent(context); startService(smsIntent); import java.util.ArrayList; import android.app.IntentService; import android.app.PendingIntent; import android.content.Intent; public class SendStreamMessage extends IntentService { public SendStreamMessage() { super("Sms Sender Intent Service"); } @Override protected void onHandleI

Categories : Android

how to implement SMS sending in VB.Net?
Not sure if I fully understand what your saying. But I think you simply want to send an SMS message in your VB .Net application. For example I think what your asking is how to send an SMS message from your VB .Net application to another phone number. If that is the case you should do the same as you would when sending E-Mails with VB .Net and utilize the SMS gateways. https://en.wikipedia.org/wiki/List_of_SMS_gateways Remember only one phone number can exist so sending an sms message to 8005551212@vzwpix.com and 8005551212@pm.sprint.com will only will work. Only one message will be recieved because the other SMS gateways don't have a number for it. So try creating a list of all the SMS gateways and having the the user type their number in and then sending the message out with the users en

Categories : Vb.Net

Sending Email in ASP.Net #2
Have you tried adding smtp.Port = 587; The best bet to keep your credentials secret is having an SMTP Server running that accepts anonymous referrers. With this criteria met, credentials aren't required with anonymous requests. There are fewer and fewer mail services allowing anonymous requests, while it used to be rampant < 10 years ago. Now most SMTP services require valid username and password credentials, some even network domain credentials.

Categories : C#

Sending info through API
In PHP use header("Location: TARGETURL"); Create the TARGETURL using the information sent from the form. The Location Header makes the server to generate 302 Moved temporarily HTTP return code. The browser then sends the user to the TARGETURL transparently without any further interaction.

Categories : PHP

Sending a php value to javascript
You may miss quotes around function call, and function agruments of personchange. Try this: echo "<button type='button' class='btn btn-link' onclick='personchange("".$row['first_name']."")'>".$row['first_name']."</button>"; They are needed, when string argument is passed. Also I suggest to: check if function personchange defined in your javascript. escape $row['first_name'] with htmlspecialchars() or something like it: for the cases when $row['first_name'] has value with quotes. I also recommend to use another output style: echo "<button type="button" class="btn btn-link" onclick="personchange('{$row['first_name']}')">{$row['first_name']}</button>"; It might be more obvious.

Categories : PHP

cURL PHP GET not sending
This type of behavior usually happens when the remote server refuse to serve to request from agents like curl, wget. So we have to spoof the agent header. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); you don't need the following headers because curl handles that on its own. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: www.thewebsite.com')); curl_setopt($ch, CURLOPT_HTTP_VERSION, 1.1); Apart from these if your site requires cookies Don't forget to include storage for cookies. curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); lastly if curl_exec returns FALSE check curl_error() for more information.

Categories : PHP

Sending value through bluetooth
byte type holds 256 values, within the range of -128...0...127 ( -128 negative number + 127 postive number + 0 ) but unsigned byte can hold values 0 to 255. Edit: unsigned doesn't supported in Java

Categories : Android

Sending BTC with Coinbase's API?
I don't have a PHP environment handy to test this with but I think it would go like this: Get their PHP library: https://github.com/coinbase/coinbase-php <?php require_once(dirname(__FILE__) . '/../lib/Coinbase.php'); // Create an application at https://coinbase.com/oauth/applications and set these values accordingly $_CLIENT_ID = "83a481f96bf28ea4bed1ee8bdc49ba4265609efa40d40477c2a57e913c479065"; $_CLIENT_SECRET = "a8dda20b94d09e84e8fefa5e7560133d9c5af9da93ec1d3e79ad0843d2920bbb"; // Note: your redirect URL should use HTTPS. $_REDIRECT_URL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $coinbaseOauth = new Coinbase_OAuth($_CLIENT_ID, $_CLIENT_SECRET, $_REDIRECT_URL); if(isset($_GET['code'])) { // Request tokens $tokens = $coinbaseOauth->getTokens($_GET['code

Categories : PHP

how do I get and use php.ini for sending email
php.ini is very useful and it is a configuration file that is used to customize behavior of PHP at runtime. PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file. This means you have to install some sort of mailserver and configure php to use it. Usually this mailserver is postfix in Ubuntu. However - if the php side you are coding will eventually be stored on a hosting service's side (e.g. xmission), a mail server will most likely already be installed there. In that case just test your site online instead of localy. Hope this helps!

Categories : PHP

Sending emails using PHP
Your php.ini wont work on webserver. On webserver most time, the emails are handled by their smtp relays. So do not worry about emails in webserver. For testing you just upload your email script on webserver at any address, and test it it works. Here I am providing you code which should work on your webserver. $To = "email address of person whom you want to send email"; $From = "your email address"; $Subject = "subject of email"; $Email = "your message"; $Headers = "MIME-Version: 1.0" . " "; $Headers .= "Content-type:text/html; charset=iso-8859-1" . " "; $Headers .= "From: " . $From . " "; $mail = mail($To, $Subject, $Email, $Headers); if ($mail) { echo "email sent"; } else { echo "email failed"; }

Categories : PHP

Sending and Receiving with UDP
The server and Android components can both be written in Java using the the standard Java DatagramSocket class. A quick example can be found here (in this instance it is sending a String from the command prompt: http://systembash.com/content/a-simple-java-udp-server-and-udp-client/. Basically, you make a DatagramSocket instance with a given port number and you send/recieve the data as a byte[]. However, I would be careful with using UDP. TCP ensures that no data is lost when the file is sent, and therefore ensures that data is not corrupted as it is sent.

Categories : Java



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