emilsD Posted August 1, 2019 Author Report Posted August 1, 2019 2 hours ago, e-remit said: Kāds ir kļūdas paziņojums? Googlē esi atļāvis savu kontu izmantot sūtīšanai? Vispār jau, ja skatās Googles epasta instrukcijās, tur cits ports norādīts! Errors https://prnt.sc/on3yta Meginaju dazadus portus un gateway ka piemeram @sms.tele2.lv. Un izmantoju savu acc gmail Quote
e-remit Posted August 2, 2019 Report Posted August 2, 2019 No sākuma tev jāpārliecinās, ka SMTP parametri ir pareizi. Paņem epasta klientu, kaut vai Mozilla Thunderbird un pamēģini caur šo SMTP serveri nosūtīt epastu! Quote
Kasspars Posted August 2, 2019 Report Posted August 2, 2019 Caur gmail smpt jau sen neko nevar nosūtīt, jāizmanto viņu OAuth2 autorizācija Quote
briedis Posted August 2, 2019 Report Posted August 2, 2019 PIereģistrējies mailgun, bezmaksās 2 tūkstoši epastu for free mēnesī Quote
emilsD Posted August 2, 2019 Author Report Posted August 2, 2019 (edited) Paldies. 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", "YOUR_API_KEY"); 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", "bar@example.com"); 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() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { MailMessage message = new MailMessage(); message.To.Add("371xxxxxxxx@sms.tele2.lv"); message.From = new MailAddress("tavsmails@gmail.com", "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("mailstavs@gmail.com", "parole"); try { smtp.Send(message); } catch (Exception ex) { MessageBox.Show(ex.Message); } } } } Varbut ar kadu varam privati telegram? :) Edited August 3, 2019 by emilsD Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.