+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Newsletter sending failure bug

Newsletter sending failure bug

7 posts, 0 answered
  1. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    13 Jul 2009
    Link to this post
    Hi guys,

    I know, I know, I haven't got my act together to renew my subscription so I have to post in the forums again :)

    So we encountered another problem with the Newsletter module, firstly somehow someone managed to enter a space into one of the subscribers so I suspect some validation is required somewhere for that.

    But the bigger issue is that when the newsletter sends it obviously fails on that email address which is understandable, except as I reported before it should only show the failed emails not stop at the first one, but I digress....

    Now the problem that then comes is that if the admin user goes and fixes the subscribers email address under manage subscribers.  Then when they go and press send it can't send because it still has the incorrect email address. So the next step you would think is to remove that subscriber but when you click on the Failure Report you can't unsubscribe that subscriber anymore and this is because all the email addresses are stored in a single field in the database delimited by semi-colons, and it uses the email address to do the matching.  So now the only way to get around this problem is to go into the database and replace the incorrect email address manually, only then can resending resume.

    An obvious solution would be to also allow the admin user to edit the subscribers details in the failure report, or at least use the subscribers ID to match them and not their email address.

    Thanks I hope this makes sense.

    Sean
  2. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    15 Jul 2009
    Link to this post
    Hi Guys,

    While I am at it let me inform you about another bug in the Newsletter module, who wrote this thing as I must say it is a very poorly written module compared to all your others?

    If there is a full stop in either the FirstName or the LastName field of a subscriber the newsletter stops with an error of "A recipient must be specified"

    Cheers
    Sean
  3. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    16 Jul 2009
    Link to this post
    Hello Sean,

    It is important not to use dot, space and non ASCII characters in the First, Last names.
    We will add a validator for first/last names in the next service pack.

    Also the sending of emails is done using the .NET class SmtpClient which stops sending of emails on the first failed email message.

    On the failed screen you can unsubscribe a user from all of its groups. You are right that emails are saved in database separated by ;. But when user is unsubscribed, this field is updated - the word Unsubscribed is added to the unsubscribed user - so the next time, email will not be sent.

    I hope this helps you.

    All the best,
    Parvan
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  4. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    16 Jul 2009
    Link to this post
    Hi Parvan,

    Thank you for your reply.  To be perfectly honest it isn't really helpful and because of these issues you will find that my client is not very happy with Sitefinity at present.

    I am not sure why ASCII characters or full stops should be a problem??  What do users who have foreign language websites going to do?  There is no point offering a localisable CMS if part of it can't handle localisable content?

    I think you will find that if you use the magic of error handling that you can keep sendings using SmtpClient and just log the email addresses that have a problem, I know this as I have built a similar system using .net 1.1 no less that does this.

    As for the unsubscribe you didn't acknowledge the bug at all??  There is a problem if a user unsubscribes someone in the failed emails list from the Manage Subscribers section instead and then tries to resume, you will find the subscriber still in the Failed List but the user can then not resume sending because it only removed that particular email address from, the only way to solve this to problem is to open up SQL Management Studio and edit the database, yuck!!

    Can someone please look into these problems!!

    Thanks
    Sean
  5. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    17 Jul 2009
    Link to this post
    Hello Sean,


    The problem with ASCII is an issue coming from System.Net.Mail.MailMessage - class containing the email information. The SMTP protocol requires non ASCII symbols to be escaped. The MailMessage class escapes the names of the sender, but do not escape the names of recipients (subscribers). There is no workaround because the escape logic is hidden in the class implementation.  

    We will try to fix the problem with the sending stopping for the next SP.

    Yes - you are right. The problem with Manage Subscribers is a bug. Please, excuse us for the inconvenience. We have added points to your account for the suggestions.

    Don't hesitate to contact us if you have other questions.

    Regards,
    Parvan
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  6. Dennis
    Dennis avatar
    2 posts
    Registered:
    04 Feb 2009
    11 Nov 2009
    Link to this post
    Parvan --

    I am using Sitefinity Community Edition v3.6 and encountering similar issues.
    Perhaps these have been addressed and I just need to upgrade.

    The fact that the newsletter sending stops on the first bad email address
    or name is unfortunate and annoying to the users.  I have created classes
    for my other "custom" ASP.Net solutions that wraps the .Net MailMessage
    class.  You should be able to validate both name and email format prior
    to sending the message, notify the CMS administrator via email message or
    log, skip the sending of that particular recipient and continue on.

    Since many of the emails addresses and names are due to self-subscription
    (i.e. sign up for newsletter through website), it is difficult for the user to police
    and validate all email addresses and names.

    Today we encountered this issue with a subscriber who entered John Smith Jr.
    The period in the name caused the failure.

    I have to agree with Sean on this.  The sending of newsletters is not up to the
    usual quality standards that I have encountered in all other Telerik products
    that I have used (or even the other parts of Sitefinity).

    Hopefully this particualr module will recieve alot of attention by the
    Telerik Sitefinity team in the next release.

    Sincerely,
    Dennis

  7. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    12 Nov 2009
    Link to this post
    Hello Dennis,

    Unfortunately this issue has not been resolved yet. However we do work towards creating a better newsletter module. In the mean time I would suggest the use of regular expression validation controls to prevent users inserting nonvalid data. Here is a suggestion how to check already entered e-mails in the subscribers group.  Please take a look at the following code snippet to match a string to a regular expression that works with the requirements for valid e-mails:
    string strRegex = @"^([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})(\]?)$";
    System.Text.RegularExpressions.Regex re = new Regex(strRegex);
    if (!re.Match(email, ""))
    {
         //output faulty email.
         //or remove it from subscribers group
    };

    You can use this to match e-mails from the subscriber group. As for when users are subscribing for a newsletter group you can add ASP.NET Regular expression validation controls in order to make user that no invalid emails are entered in. As well as for first and last names as only English alphanumeric characters are allowed. To do this to to ~/Sitefinity/ControlTemplates/Newsletters/SubscriptionFormTemplate.ascx. If you are using e-mail only mode for the subscription form you should add reg ex validator only to textbox with ID sf1_email. If mode with e-mails and names is used add validators to text controls that are in emailNamehldr placeholder here is a sample for reg ex validators:
    <li>
        <asp:Label ID="Label1" runat="server" Text="Email:" AssociatedControlID="sf2_email"></asp:Label>
        <asp:TextBox runat="server" ID="sf2_email" CssClass="sf_subscribeTxt" ValidationGroup="subscription"></asp:TextBox>
        <asp:RequiredFieldValidator ID="emailEmptyValidator2" runat="server" CssClass="sf_emailValidation"
            ValidationGroup="subscription" ControlToValidate="sf2_email" Display="Dynamic"
            EnableViewState="False" SetFocusOnError="True">
            <strong><asp:Literal ID="Literal7" runat="server" Text="Email cannot be empty!"></asp:Literal></strong>
        </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="emailREValidator2" runat="server" CssClass="sf_emailValidation"
            ControlToValidate="sf2_email" Display="Dynamic" EnableViewState="false" SetFocusOnError="true"
            ValidationExpression="^([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})(\]?)$" ValidationGroup="subscription">
            <strong><asp:Literal ID="literal22" runat="server" Text="Wrong email!"></asp:Literal></strong>
        </asp:RegularExpressionValidator>
    </li>
    <li>
        <asp:Label ID="Label2" runat="server" AssociatedControlID="sf_firstname" Text="First name:"></asp:Label>
        <asp:TextBox runat="server" CssClass="sf_subscribeTxt" ID="sf_firstname"></asp:TextBox>
         <asp:RegularExpressionValidator ID="firstNameValidator" runat="server" CssClass="sf_emailValidation"
            ControlToValidate="sf_firstname" Display="Dynamic" EnableViewState="false" SetFocusOnError="true"
            ValidationExpression="^[a-zA-Z0-9]*$" ValidationGroup="subscription">
            <strong><asp:Literal ID="literal3" runat="server" Text="First name can contain only Elnglish alphanumeric characters"></asp:Literal></strong>
        </asp:RegularExpressionValidator>
    </li>

    All the best,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
7 posts, 0 answered