Re: [Vala] Call default mail app (like evolution) from a Vala/Gtk+ app



I would think Gtk.show_uri() or AppInfo.launch_default_for_uri() would do the trick.

-- Jim

On Wed, Feb 27, 2013 at 5:39 PM, jezra <jezra jezra net> wrote:
Hello, I do not have a default email program, but the following code may work for you. It calls a command line tool to launch email.

public static void main() { string subject = "Hello World"; string body = "Greetings World, it is nice to meet you"; string address = "example example com"; //build a command from the data string command = @"xdg-email --subject '$subject' --body '$body' $address"; stdout.printf(@"$command\n"); //run the command try { Process.spawn_command_line_async( command ); } catch(SpawnError err) { stdout.printf(err.message+"\n"); } }

On Wed, 27 Feb 2013 22:07:44 -0300 Andres Fernandez wrote: > Hello, I'm trying to find how to call the window to write a mail of > the default mail app, with a predefined subject and a predefined text > in the body of the mail. > > Is it possible? > > My English is quite limited do I don't know if it is clear. > > Thanks! > > ______ _________________________________________ > vala-list mailing list > vala-list gnome org > https://mail.gnome.org/mailman/listinfo/vala-list _______________________________________________ vala-list mailing list vala-list gnome org https://mail.gnome.org/mailman/listinfo/vala-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]