Alex21;795194 said:Ill get around to fixing this, i hope.
Did you fix it?
Alex21;795194 said:Ill get around to fixing this, i hope.
public static bool Enabled = true; // Is this system enabled?
public static string ServerName = "xxxuo"; // Your server name here.
public static string EmailServer = "http://www.xxxuo.com/squirrelmail/src/webmail.php"; // Your mail server here
public static string User = "[email protected]"; // Your username here
public static string Pass = "************"; // Your password here
public static string YourAddress = "[email protected]"; // Your email address here, Or Shard name
// Server will crash on start up if the adress is incorrectly formatted.
public static SmtpClient client;
public static MailMessage mm;
public static bool Enabled = true; // Is this system enabled?
public static string ServerName = "Shard Name"; // Your server name here.
public static string EmailServer = "gmail.com"; // Your mail server here
public static string User = "Email User"; // Your username here
public static string Pass = "Emailpass"; // Your password here
public static string YourAddress = "[email protected]"; // Your email address here, Or
Has anybody got this working properly with gmail? I've tried with my domain email and it still doesnt work?
You should try using pop.gmail.com instead of smtp.gmail.com also make sure pop is enabled for your gmail account or it won't work. If it doesn't work, you can try the smtp.gmail.com link instead and see if it works. Smtp requires authentication, don't think pop does. But both use ssl, smtp can also use tls though. Hope this helps.
Also, you're username should include the @gmail.com part at the end. Not just your gmail username.
certmgr -ssl -m smtps://smtp.gmail.com:465
mozroots --import --ask-remove --machine
public static void Initialize()
{
if (Enabled)
{
client = new SmtpClient(EmailServer);
client.Credentials = new NetworkCredential(User, Pass);
mm = new MailMessage();
mm.Subject = ServerName;
mm.From = new MailAddress(YourAddress);
}
}
public static void Initialize()
{
if (Enabled)
{
client = new SmtpClient
{
Host = EmailServer,
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential(User, Pass)
};
mm = new MailMessage();
mm.Subject = ServerName;
mm.From = new MailAddress(YourAddress);
}
}
using System.Reflection;
using System.Text.RegularExpressions;
public bool ValidateEmail(string s, string s2)
{
if (s == "" || s2 == "")
return false;
if (!s.Contains("@") || !s2.Contains("@"))
return false;
if (s != s2)
return false;
return true;
}
public static bool ValidateEmail(string inputEmail, string inputEmail2)
{
if (inputEmail == "" || inputEmail2 == "") // are they blank?
return false;
if (inputEmail != inputEmail2) // do they match?
return false;
if( inputEmail == null || inputEmail.Length == 0 ) // is null or zero length?
return false;
const string expression = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
@"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
@".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
Regex regex = new Regex(expression);
return regex.IsMatch(inputEmail); // Does this email look legit?
}
public static bool ValidateEmail(string inputEmail, string inputEmail2)
{
if (inputEmail == "" || inputEmail2 == "") // are they blank?
return false;
if (inputEmail != inputEmail2) // do they match?
return false;
if( inputEmail == null || inputEmail.Length == 0 ) // is null or zero length?
return false;
strIn = Regex.Replace(inputEmail, @"(@)(.+)$", this.DomainMapper); // grab the domain name
if (invalid)
return false;
const string expression = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
@"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
@".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
Regex regex = new Regex(expression);
return regex.IsMatch(inputEmail); // Does this email look legit?
}
private string DomainMapper(Match match)
{
IdnMapping idn = new IdnMapping();
string domainName = match.Groups[2].Value;
try {
domainName = idn.GetAscii(domainName);
}
catch (ArgumentException) {
invalid = true;
}
return match.Groups[1].Value + domainName;
AddBackground(47, 372, 409, 140, 9300);
AddLabel(234, 376, 0, "Register Adress");
AddLabel(121, 404, 0, "Email:");
AddImage(172, 400, 1143);
AddTextEntry(180, 402, 255, 20, 0, 2, "" );
AddLabel(58, 443, 0, "Confirm Email:");
AddImage(172, 437, 1143);
AddTextEntry(180, 439, 257, 20, 0, 3, "" );
AddButton(135, 474, 4007, 4006, 1, GumpButtonType.Reply, 0);
AddLabel(172, 476, 0, "Submit");
AddImage(251, 176, 1249);
AddImage(353, 248, 1059);
AddImage(246, 164, 50990);
AddImage(467, 164, 50991);
AddImage(458, 163, 50993);
AddImage(238, 165, 50992);
AddImage(376, 403, 5214);
AddImage(440, 403, 5214);
AddImage(440, 427, 5214);
AddImage(376, 427, 5214);
AddItem(396, 335, 3823);
AddItem(410, 319, 3823);
AddItem(423, 333, 3823);
AddItem(456, 333, 3823);
AddItem(443, 320, 3823);
AddItem(396, 335, 3859);
AddItem(423, 325, 3859);
AddItem(449, 340, 3859);
AddItem(466, 327, 3859);
AddItem(446, 328, 3858);
AddItem(421, 343, 3858);
AddItem(446, 330, 3857);
AddItem(423, 331, 3856);
AddItem(452, 344, 3856);
AddItem(403, 332, 3856);
AddItem(461, 350, 3855);
AddItem(396, 348, 3855);
AddItem(492, 276, 2594);
AddItem(269, 278, 2594);
AddLabel(399, 298, 67, "Please Register!");
AddLabel(295, 447, 1014, "Protect your Account! Take a moment to register!");
AddLabel(387, 221, 1014, "Welcome to RunUO!");
AddLabel(295, 400, 67, "Enter Email:");
AddTextEntry(383, 400, 139, 20, 0, 2, "");
AddLabel(290, 425, 67, "Verify Email:");
AddTextEntry(383, 424, 139, 20, 0, 3, "");
AddButton(536, 411, 247, 248, 1, GumpButtonType.Reply, 0);