FAQ Database Discussion Community


when would a blocking socket.send() block? (UDP)

sockets,udp,send,blocking
I have been reading about UDP sockets in python. By default a socket is configured so that sending or receiving data blocks, stopping program execution until the socket is ready. Calls to send() wait for buffer space to be available for the outgoing data, and calls to recv() wait for...

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

php,email,gmail,phpmailer,send
I am trying to set up a contact form at the bottom of my page. I am using PHPMailer and trying to receive emails at my gmail account. Every time I submit the form, my url changes to url/email.php and I get a blank page. What am I doing wrong?...

Multipeer connectivity

ios,networking,send,multipeer-connectivity
I'm using this as a server-client peer-peer way, so that only the code on one device determines the outcome for the others. So, I'm not very far into it.. But I'm setting up a lobby for connected players. Client uses browser, then when a connection is established, the done button...

Can't send mail from C# app

c#,email,send
I'm trying to send a mail from an app I'm developing but always get the same exception message: "Aditional Information: Mailbox unavailable. The server response was: 5.7.3 Requested action aborted; user not authenticated". Here's my code: SmtpClient appClient = new SmtpClient("smtp-mail.outlook.com"); appClient.Port = 587; appClient.DeliveryMethod = SmtpDeliveryMethod.Network; appClient.UseDefaultCredentials = false;...

How to print a message within a process when it gets the right from another process in erlang?

process,erlang,send,alarm,spawn
I'm all new to erlang, and i got this task: Write a function "setalarm(T,Message)" what starts two processes at the same time. After T miliseconds the first process sends a message to the second process, and that message will be the Message arg. It's forbidden to use function library, only...

How can I assign a url from a property for a Send Mediator within WSO2 ESB?

url,wso2,wso2esb,send,synapse
I'm looking to create a Send Mediator using a url that's configured within a separate database. I have the url in question assigned to a property myurl within my sequence. How can I create a send using this property as the send's url? Something like .. <property name="myurl" value="http://www.google.com"></property> <send>...

Sending email Intent with EXTRA_STREAM crashes with GMail

android,email,gmail,send,email-attachments
I'm trying to send an email from my app with attachment. When the chooser pops up, if I tap on GMail, GMail crashes; if I tap on the default email client of my device, it works perfectly. The attachment is a jpeg taken from the external sd.Here the code: filelocation...

Delphi sending value between two windows - createparams override

windows,forms,delphi,send
Hello I have main form and two another forms. Both have this code on createparams procedure TfrForm2.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); with Params do begin ExStyle := ExStyle or WS_EX_APPWINDOW; end; end; and both (TfrForm2 and TfrForm3) are opened from main form by using code : with TfrForm2.Create(Application) do...

send a friend in modal bootstrap

php,twitter-bootstrap,modal-dialog,send,friend
Well, before asking here I have tried to find an answer for the issue I work with. Maybe someone who knows will help to find solution. I'm using bootstrap framework and here I have a "send friend" button which shows a modal fill-in form. here's link: http://codepen.io/anon/pen/bNvOPB?editors=100 If fill out...

PHP/Java socket communication not working

java,php,sockets,send
I've been stuck for two days with the following problem: I wrote a java socket server which can receive and send data to a socket hosted at 'localhost:64005'. I can connect to it via php and send or receive messages. However I cannot send and then receive an answer. I've...

MIME::Lite - Cannot send mail [SMTP auth() command not supported on smtp.gmail.com]

perl,email,smtp,gmail,send
use MIME::Lite; use warnings; use MIME::Base64; use Authen::SASL; use MIME::Lite; use MIME::Base64; use Authen::SASL; use warnings; use Net::SMTP::TLS; use Data::Dumper; use MIME::Lite; $to = '[email protected]'; $cc = '[email protected]'; $from = '[email protected]'; $subject = 'Test Email'; $message = 'email'; $msg = MIME::Lite->new( From => $from, To => $to, Cc =>...

Sending input data to a javascript file

javascript,jquery,ajax,html5,send
My following code is this: <form> <input class="inputField" type="text" required="required" pattern="[a-zA-Z]+" /> <input class="myButton" type="submit" value="Submit" /> </form> <script type="text/javascript"> $(document).ready(function () { $(".myButton").on("click", function () { var value = $(".inputField").val(); }); }); </script> I want to send to the file main.js the data after a user puts in some...

Network Byte Order in sockets

c,sockets,integer,send
I'm learning sockets programming in c (Linux), and I can't really understand why is it necessary to use htonl when you are sending an integer, but not when you are sending a string (char*). I've read a lot of papers, but I still don't know why.

How can I send GET request with sockets?

c#,sockets,get,request,send
I want to send GET/POST request with sockets, and I have this code: Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Connect(Url, 80); byte[] contentLenght = Encoding.ASCII.GetBytes(Data); string[] masRequestString ={ "GET /"+Data+" HTTP/1.1\r\n" , "Host: "+Url+"\r\n", "User-Agent: "+textBox1.Text+"\r\n", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n", "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n", "Referer: "+textBox2.Text+"\r\n"};...

fopen multiple files to send mail with mail() php

php,email,send,multiple-files
i have problems to send mail with multiple files with mail() php. Until now, only send the first file, so i need your help please. Give you my code: HTML: <form action="colabora.php" method="post" enctype="multipart/form-data"> [...] <div id="adjuntos"> <input type="file" name="archivos[]" class="form-control"/> </div> [...] PHP: [...] if (isset ($_FILES["archivos"])) { $tot...

Yii2 - mailer - send message to email rows in database

arrays,string,yii2,send,mailer
Greetings, i need to send email to several recipients that are stored in a table named mail which has a field called email. In my controller i created an action that Query the table mail for the emails. Later i tried to use the implode() function separated by comma, but...

Winsock asynchronous multiple WSASend with one single buffer

asynchronous,buffer,winsock,send,iocp
MSDN states "For a Winsock application, once the WSASend function is called, the system owns these buffers and the application may not access them." In a server application, does that mean that if I want to broadcast a message to multiple clients I cannot use a single buffer that holds...

C send function between server and client not working

c,multithreading,tcp,send
I am trying to get a server (SENSORSERVER) and client(CGI) to communicate using the send() function. The first loop round the SENSORSERVER sends the string "Hello world" to the CGI correctly, but on the second loop around the while loop, the CGI does not receive properly on the recv function....

Resend old password to user's email in Wordpress

wordpress,email,plugins,passwords,send
On a blog of mine, a user asked me if I could tell him his password from that account, which happens to be the same password he used on multiple accounts, on an email which was deactived - the point is he needs that specific password. Since the only option...

Capture output from ssh with expect script

ssh,output,send,expect,cisco
I want to capture the output of my expect script in a file.txt. #!/usr/bin/expect -f match_max 10000 set timeout 120 eval spawn ssh 10.0.0.0 set prompt ":|#|\\\$" interact -o -nobuffer -re $prompt return send "password\r" expect ">" send "sh cdp neighbors detail\r\r " expect ">" send "\n" sleep 5 This...

Sending and receiving data over Internet

sockets,design,data,send
This question is not for a concrete implementation of how this is done. It is more about the concept and design of sending information over Internet with some kind of protocol - either TCP or UDP. I know only that sockets are needed, but I am wondering about the rest....

Is MulticastSocket.send() reentrant?

java,send,multicastsocket
I have 2 threads that want to invoke: multicastSocket.send(dP1) and multicastSocket.send(dP2) respectively, where dP1 and dP2 are different DatagramPacket objects, and multicastSocket is the shared instance of MulticastSocket. I don't understand if concurrency problems may happen on multicastSocket, if the threads call send() in the same moment....

Having trouble with simple Send/Recv using MPI in Fortran

fortran,mpi,send
I am trying to send a single integer from one process to another. However, I am getting a segmentation fault/invalid memory reference. Apparently I have misunderstood some basic notion of MPI. Can anyone tell me what I am doing wrong? program read_data use mpi implicit none integer :: ierr, my_id,...

Calling methods a la Object#send, but not breaking when given a nonexistent method (Ruby)

ruby,send
I'm trying to do something like this in Ruby with the send method: class Foo def bar puts "Foo's bar method" end end foo = Foo.new foo.send :bar # => "Foo's bar method" foo.send :baz # => NoMethodError: undefined method `baz' for #<Foo:0x00000000a2e720> # Is there a way I can...

Sending png file via socket in Python

python,sockets,png,send
I'm using python version 2.7.9 and i try to send png file. But something strange happens..i using sockets and sends a post request(or kind of). I send the request to the server from the client,then i prints the length of the request received on the server, for example, the length...

Java Simple Email Program in Eclipse

java,email,web-applications,send
I want to make a simple program where you can send email from the Command Line. I found this tutorial, ' http://www.tutorialspoint.com/java/java_sending_email.htm ', however the downloads don't. So where can I get JavaMail API and Java Activation Framework (JAF) and how would i put it in my class path. Basically...