tekman has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to connect to emaildirect.com using one of their protocals (RelaySend_SendEmail). However, I get "Server did not recognize the value of HTTP Header SOAPAction: http://dev.emaildirect.com/v1/api.asmx?WSDL#RelaySend_SendEmail" Below is the code. I would appreciate any help.

use SOAP::Lite trace => 'all'; $username="bob"; $password="jane"; $toaddemail='test@test.com'; my $soap = SOAP::Lite -> uri('http://dev.emaildirect.com/v1/api.asmx?WSDL') -> proxy('http://dev.emaildirect.com/v1/api.asmx?WSDL',credentials=> +("$username","$password")) -> soapversion('1.2') ; $soap->RelaySend_SendEmail('$toaddemail',('FieldName'=>'FirstName', 'V +alue'=>'Jason'));

Replies are listed 'Best First'.
Re: Using Soap to connect to emaildirect.com
by kcott (Archbishop) on Nov 05, 2010 at 15:53 UTC

    I notice you have '$username'. Unless that's just an example, you probably want "$username" (i.e. double quotes). And a few lines down you have the same sort of thing with '$toaddemail'.

    -- Ken

      Those where examples but I updated them so there is no other confusion. Thanks for pointing it out.