Author image venkatakrishnan


Net::SMS::ViaNett - Perl Interface to Vianett HTTP API


    use Net::SMS::ViaNett;

    my $obj = Net::SMS::ViaNett->new( username => $username, password => $password );
    if( $obj->send( to => $phone, msg => $message ) ) {
      print "Sent";
    } else {
      print "Not Sent";


Vianett ( ) offers commercial service for sending / recieving SMS amongst other services. This module offers a convinient way to send SMS using ViaNett's API.

ViaNett offers various ways to contact their API, this module uses their HTTP API.

ViaNett's API documentation can be found at

Please take note that neither this software nor the author are related to ViaNett in any way.



Creates the Net::SMS::ViaNett Object


  my $vianett = Net::SMS::ViaNett->new( username => $username, password => $password );

The complete list of arguments is:

  username  : The username that is given by Vianett
  password  : The password that is given by Vianett

Sets/Gets User-Agent String to be sent to ViaNett during the HTTP Request


  # Gets Current User-Agent String 

  # Sets User-Agent String
  $vianett->agent( 'Spider Monkey' );

Sends the message through ViaNett's API


    $vianett->send( to => $number, msg => $message );

    $vianett->send( to => $number, msg => $message, from => $source );

send method accepts following arguments

    to          - Destination number
    from        - Originator number 
    msg         - The message you want to send
    origin      - Alpha numeric originator number. Can only be used with messages with pricegroup=0
    operator    - The operator ID. Use 0 if this number is unknown.
    refno       - Message reference number. This number must be a unique ID.
    pricegroup  - The pricegroup. Example: 100 is NOK 1,- and 1500 is NOK 15,-.
    header      - The Optional Message Header

return 1 on success and 0 on failure


Venkatakrishnan Ganesh <>


Copyright (c) 2009 Venkatakrishnan Ganesh. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This software or the author aren't related to ViaNett in any way.