Jump to content
php.lv forumi

Csharp problema

Recommended Posts


Bet es nesaprotu ka seit pievienot telefona num:

Api kei ir,bet nesaprotu ar to numuru hmmm

using System;
using System.IO;
using RestSharp;
using RestSharp.Authenticators;

public class SendSimpleMessageChunk

    public static void Main (string[] args)
        Console.WriteLine (SendSimpleMessage ().Content.ToString ());

    public static IRestResponse SendSimpleMessage ()
        RestClient client = new RestClient ();
        client.BaseUrl = new Uri ("https://api.mailgun.net/v3");
        client.Authenticator =
            new HttpBasicAuthenticator ("api",
        RestRequest request = new RestRequest ();
        request.AddParameter ("domain", "YOUR_DOMAIN_NAME", ParameterType.UrlSegment);
        request.Resource = "{domain}/messages";
        request.AddParameter ("from", "Excited User <mailgun@YOUR_DOMAIN_NAME>");
        request.AddParameter ("to", "[email protected]");
        request.AddParameter ("to", "YOU@YOUR_DOMAIN_NAME");
        request.AddParameter ("subject", "Hello");
        request.AddParameter ("text", "Testing some Mailgun awesomness!");
        request.Method = Method.POST;
        return client.Execute (request);


Iesledzot Tele2 Latvia 371#########@sms.tele2.lv send text 'ON' to 1612.

Un iesledzot gmail Atļauja piekļūt no lietotnēm ar zemāku drošības līmeni: IESLĒGTA  ,atnak sms no mana epasta.Bet man kautka gribetos,lai sutas vnk ka sms nevis no epasta,hmmmm

Vai ir jega no siem kadu nemt? Paskatijos nop... https://smsemailgateway.com/

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Net.Mail;

namespace smssutit
    public partial class Form1 : Form
        public Form1()

        private void Button1_Click(object sender, EventArgs e)
            MailMessage message = new MailMessage();
            message.To.Add("[email protected]");
            message.From = new MailAddress("[email protected]", "App");
            message.Body = "Jauna zina";
            SmtpClient smtp = new SmtpClient("smtp.gmail.com");
            smtp.EnableSsl = true;
            smtp.Port = 587;
            smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
            smtp.Credentials = new NetworkCredential("[email protected]", "parole");


            catch (Exception ex)

Varbut ar kadu varam privati telegram? :)

Edited by emilsD
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...